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

Stop fetching live stream while paused #982

Closed
yairans opened this issue Aug 23, 2017 · 19 comments
Closed

Stop fetching live stream while paused #982

yairans opened this issue Aug 23, 2017 · 19 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@yairans
Copy link

yairans commented Aug 23, 2017

What version of Shaka Player are you using: latest of demo app

Can you reproduce the issue with our latest release version: yes

Can you reproduce the issue with the latest code from master: yes

Are you using the demo app or your own custom app: demo app

What browser and OS are you using: chrome 60 on macOS Sierra 10.12

What are the manifest and license server URIs: Big Buck Bunny (live) from demo app

What did you do?
load -> pause

What did you expect to happen?
The video.currentTime should remain at the paused position. the video should present the same image until play.

What actually happened?
each downloaded chunk updates the currentTime and the video image.
Note the scrubber, once is reaching to the start it's happening.

@kuznetcoff777
Copy link

Approving, when player is paused on live conent, it still downloads video segmetns to update images. It is bug, i suppose, user downloads segments when it is not necessary.

@theifish
Copy link

Confirm the bug.
When currentTime reaches lowest available time (video.currentTime < shakaPlayer.seekRange().start), shaka starts to load chunks forward and automatically seeks to last available lowest time untimelly.
It's very annoying behaviour for a user.
I think the proper way is to update mpd file periodically and not to load video/audio chunks, and when user press play, just seeks to last available time (if out of range).

@kuznetcoff777
Copy link

@joeyparrish, please answer us

@joeyparrish
Copy link
Member

Hi all,

The "needs triage" label means we are aware of the issue but have not reproduced it or scheduled any changes. We will get to this as soon as we can. We apologize for the delay.

@joeyparrish joeyparrish added type: enhancement New feature or request and removed needs triage labels Sep 5, 2017
@joeyparrish joeyparrish added this to the v2.3.0 milestone Sep 5, 2017
@joeyparrish
Copy link
Member

It seems that there are two things at work here.

  1. If the playhead falls outside the seek range, we force the playhead back in. This is a good thing generally, but perhaps this should be suppressed while paused. If the user pauses a live stream for so long that we fall outside the seek range, we would jump back into the seek range when the user hits play.
  2. We continue to buffer while paused. This is also generally a good thing. Imagine you want to pause the content specifically to let it buffer. Perhaps adaptation is turned off and the player is forced to a high resolution, or perhaps there is no stream with low enough bandwidth for you and you are a patient user. So we don't want to stop buffering when paused. But perhaps we should consider an exception where if paused and outside the seek range, we stop buffering. This would be more work than point 1 above, and have less effect since buffering while paused will always stop once the buffering goal it hit.

For now, I propose that we suppress forced seeks based on the seek range while paused. (This is in shaka.media.Playhead.) I expect this will be enough, but if not, we can explore changes to StreamingEngine as well.

Tentatively scheduled for v2.3.

@kuznetcoff777
Copy link

"But perhaps we should consider an exception where if paused and outside the seek range, we stop buffering." - what if there will be long DVR, for exampe 24 hours? It will still download for 24 hours. I propose to dome some configurable parameter, that configures x seconds timeout after which not to download new segments after x seconds of being paused.

@joeyparrish
Copy link
Member

what if there will be long DVR, for example 24 hours? It will still download for 24 hours. I propose to dome some configurable parameter, that configures x seconds timeout after which not to download new segments after x seconds of being paused.

No, it wouldn't download for 24 hours in that scenario. If the buffering goal were set to 60 seconds, it would only download 60 seconds of content ahead of the playhead. If we are paused, the playhead wouldn't move (change 1 above) and we'd stop buffering soon.

So in essence, the parameter you propose already exists: streaming.bufferingGoal Does that make sense?

@kuznetcoff777
Copy link

O, thats fine

@joeyparrish joeyparrish changed the title live - currentTime and video image are being updating while pause Stop fetching live stream while paused Oct 2, 2017
@chrisfillmore
Copy link
Contributor

Just wanted to mention that this issue is on our radar. We have a requirement to allow users to pause live video for long periods of time.

@joeyparrish
Copy link
Member

Thanks, Chris. Many other things are slipping to v2.4, but this is still scheduled for v2.3.

@sgalkovski
Copy link

Regarding v2.3 , when you plan release it , is it scheduled for 2017 ?

@joeyparrish
Copy link
Member

Yes, we plan to release v2.3 in 2017. I would like to give a more specific timeline, but it is difficult to predict when we will finish work on the critical issues that make up that milestone. You can track progress by watching the number of open and closed issues in the milestone.

@sandeep-mirpuri
Copy link

sandeep-mirpuri commented Oct 9, 2017

@joeyparrish really need this fix. We have the same requirement as @chrisfillmore. Until you guys push 2.3, are there any suggestions on something we can do with the current APIs to mock the effect of it not buffering, so users don't see frames changing constantly? Thanks :)

@joeyparrish
Copy link
Member

I'm sorry, there's nothing I can think of. Forced seeks in PlayheadObserver should be suppressed while the video is paused. If you need a fix sooner than we can provide one, you always have the option of submitting a pull request. Sorry for the delay.

joeyparrish pushed a commit that referenced this issue Oct 23, 2017
Fixing: when a livestream is paused, we force the playhead back in
if the playhead falls out of the seek range, which makes the paused
image change.
Now we'll jump when the user hits play.

Closes #982.

Change-Id: I3f9e05e15c710488477b70ea7642f007c771ea92
@joeyparrish
Copy link
Member

The fix has been cherry-picked to v2.2.4.

@sandeep-mirpuri
Copy link

@joeyparrish That's fantastic! Thanks.

@joeyparrish
Copy link
Member

Happy to help! Kudos to @michellezhuogg for doing the actual work. :-)

@kuznetcoff777
Copy link

We got 2.2.4 version and timeShiftBufferDepth="PT299.50S"
When paused, and more then 5 minutes passed player still try to be up to date and download segments (but not refreshing picture). How to stop player fetch segments?

@vaage
Copy link
Contributor

vaage commented Nov 13, 2017

@kuznetcoff777 Could you open a separate issue for the problem you found with repo steps? It will be easier for us to track as a bug separate from the original enhancement.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

10 participants