Skip to content

player: fix seeking during dead time#38914

Merged
zmb3 merged 7 commits into
masterfrom
zmb3/player-delay-fix
Apr 10, 2024
Merged

player: fix seeking during dead time#38914
zmb3 merged 7 commits into
masterfrom
zmb3/player-delay-fix

Conversation

@zmb3
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 commented Mar 3, 2024

This addresses a bug in the new player API where the player does not respond to seeking during large periods of "dead time." For example, if there is 30 seconds of dead time between two events, the player is effectively in a 30 second sleep. Attempting to change the position of playback during this 30-second period works, but is not observed until the sleep completes.

With this change, the sleep period is canceled when the user seeks to a new position.

Fixes #38560

Changelog: Improve the responsiveness of the session player during long periods of idle time.

Comment thread lib/player/player.go Outdated
Comment on lines 288 to 290
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe update the comment to indicate that the delay can be interrupted by user operations?

Comment thread lib/player/player.go Outdated
@zmb3
Copy link
Copy Markdown
Collaborator Author

zmb3 commented Mar 3, 2024

Looks like I have some flakiness to sort out 😞

This addresses a bug in the new player API where the player does
not respond to seeking during large periods of "dead time."
For example, if there is 30 seconds of dead time between two events,
the player is effectively in a 30 second sleep. Attempting to change
the position of playback during this 30-second period works, but is
not observed until the sleep completes.

With this change, the sleep period is canceled when the user seeks
to a new position.

Fixes #38560
@zmb3 zmb3 force-pushed the zmb3/player-delay-fix branch from 6274741 to a1db340 Compare March 4, 2024 01:03
@kimlisa
Copy link
Copy Markdown
Contributor

kimlisa commented Mar 4, 2024

when testing, the idle time no longer freezes me, but trying to skip over the idle time, doesn't resume recording as it should:

https://www.loom.com/share/892305a678974f00ad293310b37d787f (the video says 3 minute, i forgot so it went on longer)

the timer and bar is incrementing, but the recording doesn't show me anything (and if i let it, timer and bar keeps going after the end time)

@zmb3 zmb3 force-pushed the zmb3/player-delay-fix branch from abe43c0 to ad49605 Compare April 1, 2024 19:45
Restart the stream in this case rather than trying to keep server
and client state in sync.
@zmb3 zmb3 force-pushed the zmb3/player-delay-fix branch from ad49605 to 581ba32 Compare April 1, 2024 19:46
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from fheinecke April 1, 2024 22:39
@zmb3 zmb3 added this pull request to the merge queue Apr 10, 2024
Merged via the queue into master with commit 41d514b Apr 10, 2024
@zmb3 zmb3 deleted the zmb3/player-delay-fix branch April 10, 2024 23:17
@public-teleport-github-review-bot
Copy link
Copy Markdown

@zmb3 See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idle time in a session recording blocks Web session player for that idle time

3 participants