mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-13 18:52:54 +00:00
Seek video to start if position is small.
This commit is contained in:
parent
5aa2e66d02
commit
2d1fdc4485
@ -1947,6 +1947,13 @@ void MediaView::toggleVideoPaused() {
|
||||
}
|
||||
|
||||
void MediaView::restartVideoAtSeekPosition(TimeMs positionMs) {
|
||||
// Seek works bad: it seeks to the next keyframe after positionMs.
|
||||
// At least let user to seek to the beginning of the video.
|
||||
if (positionMs < 1000
|
||||
&& (!_videoDurationMs || (positionMs * 20 < _videoDurationMs))) {
|
||||
positionMs = 0;
|
||||
}
|
||||
|
||||
_autoplayVideoDocument = _doc;
|
||||
|
||||
if (_current.isNull()) {
|
||||
|
Loading…
Reference in New Issue
Block a user