mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix animated userpics playback in media viewer.
Regression was introduced in 0ecd4d3b40
.
I hope it fixes #10288.
This commit is contained in:
parent
b5a2b0fb98
commit
4928066be7
1 changed files with 6 additions and 4 deletions
|
@ -2495,19 +2495,21 @@ bool OverlayWidget::initStreaming(bool continueStreaming) {
|
|||
void OverlayWidget::startStreamingPlayer() {
|
||||
Expects(_streamed != nullptr);
|
||||
|
||||
if (!_streamed->instance.player().paused()
|
||||
&& !_streamed->instance.player().finished()
|
||||
&& !_streamed->instance.player().failed()) {
|
||||
const auto &player = _streamed->instance.player();
|
||||
if (player.playing()) {
|
||||
if (!_streamed->withSound) {
|
||||
return;
|
||||
}
|
||||
_pip = nullptr;
|
||||
} else if (!player.paused() && !player.finished() && !player.failed()) {
|
||||
_pip = nullptr;
|
||||
} else if (_pip && _streamed->withSound) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto position = _document
|
||||
? _document->session().settings().mediaLastPlaybackPosition(_document->id)
|
||||
? _document->session().settings().mediaLastPlaybackPosition(
|
||||
_document->id)
|
||||
: _photo
|
||||
? _photo->videoStartPosition()
|
||||
: 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue