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 of some static MPD doesn't automatically start in Chrome, possibly due to floating point error in MSE interface #1309

Closed
albertcsm opened this issue Feb 20, 2018 · 4 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@albertcsm
Copy link
Contributor

albertcsm commented Feb 20, 2018

Have you read the FAQ and checked for duplicate open issues?: Yes

What version of Shaka Player are you using?: v2.3.2

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, Windows or Linux

What are the manifest and license server URIs?: Attached manifest

What did you do? Load static asset

What did you expect to happen? Playback automatically start after load

What actually happened? Need manual seek to start playback

I loaded a static MPD in Shaka player in Chrome and expect it to automatically start playing.
But the loading indicator keep spinning, and console logs showed that it keep attempting gap-jumping to 0.062633s.
image

I need to do a manual seek on the seek bar to get the MPD playing.

Chrome's media-internal page showed that the seek_target was at 0.062632s, instead of 0.062633s
image

The issue can only be reproduced in Chrome, but not Firefox, and happenens on both Windows and Linux.

I tried adding a small number to the gap-jumping code in "playhead.js", and the problem seems resolved:
this.movePlayhead_(currentTime, jumpTo);
to this.movePlayhead_(currentTime, jumpTo + Number.EPSILON);

So I think the issue is likely due to floating-point precision in the MSE interface of Chrome.

@albertcsm albertcsm changed the title Playback of static MPD doesn't automatically start for some assets in Chrome, possibly due to floating point error in MSE interface Playback of some static MPD doesn't automatically start in Chrome, possibly due to floating point error in MSE interface Feb 20, 2018
@albertcsm
Copy link
Contributor Author

Here is a sample asset:
DASH.zip

@ismena
Copy link
Contributor

ismena commented Feb 20, 2018

Hi @albertcsm, thanks for the investigative work you put into this!

@TheModMaker could I ask you to take a quick look and say whether you think there might be more to this in terms of our gap-jumping logic? If not, I'll be happy to follow the floating-point precision lead.

@TheModMaker
Copy link
Contributor

It seems weird that the browser would says that 0.062633 is buffered, but when we seek to it, it puts us at 0.062632. Maybe this is a browser bug. You may want to file a bug on Chrome.

But we should still not get stuck in infinite loops like this. We can just ignore extremely small gaps since the browser should ignore them anyway.

@TheModMaker TheModMaker added type: bug Something isn't working correctly and removed needs triage labels Feb 20, 2018
@TheModMaker TheModMaker added this to the v2.4.0 milestone Feb 20, 2018
@TheModMaker TheModMaker self-assigned this Feb 20, 2018
joeyparrish pushed a commit that referenced this issue Feb 21, 2018
The browser should handle extremely small gaps for us.  So having the
browser handle these gaps, this avoids an infinite loop if there are
rounding errors.

Backported to v2.3.x

Closes #1309

Change-Id: I365f44185f570571f6b093bdcaad92fef49b5b16
@joeyparrish
Copy link
Member

Cherry-picked for v2.3.3.

@shaka-project shaka-project locked and limited conversation to collaborators Apr 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: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

5 participants