mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Use Streaming::Player in video messages playback.
This commit is contained in:
@@ -750,13 +750,18 @@ bool Player::active() const {
|
||||
}
|
||||
|
||||
bool Player::ready() const {
|
||||
return (_stage != Stage::Uninitialized) && (_stage != Stage::Initializing);
|
||||
return (_stage != Stage::Uninitialized)
|
||||
&& (_stage != Stage::Initializing);
|
||||
}
|
||||
|
||||
rpl::producer<Update, Error> Player::updates() const {
|
||||
return _updates.events();
|
||||
}
|
||||
|
||||
QSize Player::videoSize() const {
|
||||
return _information.video.size;
|
||||
}
|
||||
|
||||
QImage Player::frame(const FrameRequest &request) const {
|
||||
Expects(_video != nullptr);
|
||||
|
||||
@@ -775,6 +780,8 @@ Media::Player::TrackState Player::prepareLegacyState() const {
|
||||
? State::StoppedAtError
|
||||
: finished()
|
||||
? State::StoppedAtEnd
|
||||
: (_stage == Stage::Uninitialized)
|
||||
? State::Stopped
|
||||
: paused()
|
||||
? State::Paused
|
||||
: State::Playing;
|
||||
|
Reference in New Issue
Block a user