mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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() {
|
void OverlayWidget::startStreamingPlayer() {
|
||||||
Expects(_streamed != nullptr);
|
Expects(_streamed != nullptr);
|
||||||
|
|
||||||
if (!_streamed->instance.player().paused()
|
const auto &player = _streamed->instance.player();
|
||||||
&& !_streamed->instance.player().finished()
|
if (player.playing()) {
|
||||||
&& !_streamed->instance.player().failed()) {
|
|
||||||
if (!_streamed->withSound) {
|
if (!_streamed->withSound) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_pip = nullptr;
|
_pip = nullptr;
|
||||||
|
} else if (!player.paused() && !player.finished() && !player.failed()) {
|
||||||
|
_pip = nullptr;
|
||||||
} else if (_pip && _streamed->withSound) {
|
} else if (_pip && _streamed->withSound) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto position = _document
|
const auto position = _document
|
||||||
? _document->session().settings().mediaLastPlaybackPosition(_document->id)
|
? _document->session().settings().mediaLastPlaybackPosition(
|
||||||
|
_document->id)
|
||||||
: _photo
|
: _photo
|
||||||
? _photo->videoStartPosition()
|
? _photo->videoStartPosition()
|
||||||
: 0;
|
: 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue