2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Show round videos in Info layer.

This commit is contained in:
John Preston
2018-11-05 17:18:54 +04:00
parent 466444e17d
commit ef64d9c188
8 changed files with 267 additions and 40 deletions

View File

@@ -22,6 +22,8 @@ enum class Type;
namespace Media {
namespace Player {
class RoundController;
class FloatController;
class FloatDelegate;
} // namespace Player
} // namespace Media
@@ -242,6 +244,14 @@ public:
RoundController *roundVideo(FullMsgId contextId) const;
void roundVideoFinished(not_null<RoundController*> video);
void setDefaultFloatPlayerDelegate(
not_null<Media::Player::FloatDelegate*> delegate);
void replaceFloatPlayerDelegate(
not_null<Media::Player::FloatDelegate*> replacement);
void restoreFloatPlayerDelegate(
not_null<Media::Player::FloatDelegate*> replacement);
rpl::producer<FullMsgId> floatPlayerClosed() const;
rpl::lifetime &lifetime() {
return _lifetime;
}
@@ -275,6 +285,9 @@ private:
base::Variable<bool> _dialogsListDisplayForced = { false };
std::unique_ptr<RoundController> _roundVideo;
std::unique_ptr<Media::Player::FloatController> _floatPlayers;
Media::Player::FloatDelegate *_defaultFloatPlayerDelegate = nullptr;
Media::Player::FloatDelegate *_replacementFloatPlayerDelegate = nullptr;
rpl::lifetime _lifetime;