Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playback stalled after using a "skip back" feature #3089

Closed
riksagar opened this issue Jan 12, 2021 · 5 comments
Closed

Playback stalled after using a "skip back" feature #3089

riksagar opened this issue Jan 12, 2021 · 5 comments
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@riksagar
Copy link

I'm looking at an issue on a 2018 LG TV. I suspect it's related to "buffer trimming" by the OS when there's more data in the SourceBuffers than memory allows (the OS had to reclaim some resources). I guess it could be Shaka doing an explicit remove()?

The problem is happening when I use a "skip back" button in our UI. You know the type of "quick review" feature that seeks back something like 30 seconds when you want to quickly repeat what just played.

What I'm seeing is that playback jumps back as expected, and plays OK for a short time, but then playback stops. In the logs, I see a "waiting" event from the video element because there's no buffered data at currentTime.

When it happens playback doesn't resume. To recover we must quit the player and restart.

It's an intermittent issue, but here's what I've extracted from logs for one instance when it happened:

  • seeking event (to time 1549.57)
  • seeked event (currentTime reports 1549.57)
  • canplay, play, playing events (currentTime reports 1549.57)
  • checking buffered ranges on video element reports 1549.505044 => 1576
  • progress event
  • Shaka log message reports: "Ignoring large gap at 1549.546 size 10.970043999999916"
  • 3 seconds after the "playing" event I see a "waiting" event
    • currentTime at that instant reports a time of 1552.549
    • checking buffered ranges of video element reports 1560.516044 => 1576

IMO, this is primarily an issue with the underlying webOS player pipeline. It appears to be making poor choices when it comes to choosing data to discard! However, I'm wondering if you'd expect Shaka to attempt to reload data around the video element's currentTime when this type of "buffer trimming" occurs on resource limited devices.

@riksagar riksagar added the type: question A question from the community label Jan 12, 2021
@TheModMaker
Copy link
Contributor

I think I see the bug. When we do an append, we cache the video's current time and pass that around. As part of the append, we evict data behind the playhead according to streaming.bufferBehind configuration. We do the eviction based on the cached current time and after we fetch the segment.

So it is possible that, while downloading the segment, we seek backward. The seek happens immediately and we detect it as a buffered seek and do nothing. Then after the download is done, we evict based on the old time. This evicts the time around the current time and we don't re-download those segments.

You could work around this by setting streaming.jumpLargeGaps to true, but that will just cause us to jump ahead again and basically ignore your seek backwards.

@TheModMaker TheModMaker added type: bug Something isn't working correctly and removed type: question A question from the community labels Mar 22, 2021
@TheModMaker TheModMaker added this to the v3.1 milestone Mar 22, 2021
@joeyparrish joeyparrish added the priority: P2 Smaller impact or easy workaround label Apr 19, 2021
@joeyparrish joeyparrish modified the milestones: v3.1, v3.2 Apr 29, 2021
@TheModMaker TheModMaker changed the title Playback stalled on LG TV after using a "skip back" feature Playback stalled after using a "skip back" feature Jun 3, 2021
@TheModMaker
Copy link
Contributor

This is actually fairly easy to reproduce on Chrome on desktop. Just start in the middle of the video and use video.currentTime -= 3 in DevTools several times. It works better on a slower connection so the video buffers.

@TheModMaker
Copy link
Contributor

I am able to reproduce fairly easily with v3.1.1, but cannot reproduce on the latest release (v3.2.1). Can you try with the latest version to see if it has been fixed?

@avelad avelad modified the milestones: v3.3, v4.1 May 4, 2022
@avelad avelad modified the milestones: v4.1, v4.2 Jun 3, 2022
@avelad avelad modified the milestones: v4.2, v4.3 Aug 17, 2022
@avelad avelad modified the milestones: v4.3, v4.4 Nov 11, 2022
@avelad
Copy link
Member

avelad commented Jan 30, 2023

Can you test with v4.3.3? Thanks!

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jan 30, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2023

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.

@github-actions github-actions bot closed this as completed Feb 6, 2023
@github-actions github-actions bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Feb 6, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Apr 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants