mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-29 13:47:47 +00: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
@ -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…
x
Reference in New Issue
Block a user