Fix video playback position reset to 0:00 on full-screen close#2207
Open
bojanstef wants to merge 1 commit into
Open
Fix video playback position reset to 0:00 on full-screen close#2207bojanstef wants to merge 1 commit into
bojanstef wants to merge 1 commit into
Conversation
cfec81f to
21d0122
Compare
…ramMessenger#1922) UniversalVideoGalleryItemNode.maybeStorePlaybackStatus persisted the playback position from every MediaPlayerStatus delivered by the throttled status subscription — including the teardown/reset status emitted when the full-screen player is dismissed (timestamp ~0, with a freshly incremented seekId). That status fell into the `else` branch and stored a position of 0.0, overwriting the real saved position on every close. So the stored "resume" point was always 0 and the video always restarted at 0:00. Persist only a genuine mid-video position; store the 0.0 "restart" sentinel only when the video is actually near the end; and leave any saved position untouched for timestamp <= 5s (which also covers the teardown reset that caused the bug). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21d0122 to
f5886ab
Compare
Author
|
@dimonstrik can I get a review |
|
On Sun, Jun 21, 2026, 12:40 AM Michael Sabalande <
***@***.***> wrote:
…
On Sat, Jun 20, 2026, 10:01 AM Bojan Stefanović ***@***.***>
wrote:
> *bojanstef* left a comment (TelegramMessenger/Telegram-iOS#2207)
> <#2207 (comment)>
>
> @dimonstrik <https://github.com/dimonstrik> can I get a review
>
> —
> Reply to this email directly, view it on GitHub
> <#2207?email_source=notifications&email_token=CFMY2ZFHCCESL3IZUIMOJ6T5AXV65A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZVGU4TQOBRGY22M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-4755988165>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/CFMY2ZGIYFJIAARIQPXWZSL5AXV65AVCNFSNUABFKJSXA33TNF2G64TZHMYTKNZVHEYDEOJUHNEXG43VMU5TINZQGQ3DEMBWGMZKC5QC>
> .
> Triage notifications, keep track of coding agent tasks and review pull
> requests on the go with GitHub Mobile for iOS
> <https://github.com/notifications/mobile/ios/CFMY2ZBVMSC455J3MKYJCF35AXV65A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZVGU4TQOBRGY22M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSVGM33PORSXEX3JN5ZQ>
> and Android
> <https://github.com/notifications/mobile/android/CFMY2ZDZ6VRNO67BVY66BBL5AXV65A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZVGU4TQOBRGY22M4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>.
> Download it today!
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the resume regression in #1922 (the primary symptom; the issue's inline-preview "continuity" point is a separate behavior change and is not included here).
Problem. Partially-watched videos always restart at
0:00instead of resuming.Cause.
UniversalVideoGalleryItemNode.maybeStorePlaybackStatuspersists the position from everyvideoNode.statusupdate. On full-screen close the player resets and emits a final status withtimestamp ≈ 0; the oldelsebranch wrote0.0, overwriting the saved position on every close, so the stored resume point ends up0and the next open starts at0:00.Runtime trace (play to ~0:16, close, re-open):
After fix (skip to 0:19s)
after-fix.mov