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

SHAKA and Offline Events #937

Closed
boredom2 opened this issue Jul 20, 2017 · 3 comments
Closed

SHAKA and Offline Events #937

boredom2 opened this issue Jul 20, 2017 · 3 comments
Assignees
Labels
status: archived Archived and locked; will not be updated
Milestone

Comments

@boredom2
Copy link

Have you read the FAQ and checked for duplicate issues:

yes

What version of Shaka Player are you using:

2.1.5

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:

both

If custom app, can you reproduce the issue using our demo app:

yes

What browser and OS are you using:

windows, android, macOS

What are the manifest and license server URIs:
(you can send the URIs to shaka-player-issues@google.com instead, but please use GitHub and the template for the rest)

any

What did you do?

see below.

What did you expect to happen?

see below.

What actually happened?

We added some basic "offline" Behaviour into our Players - at least to that Point, that it shouldnt just crash, when going offline, but instead showing a Message, pause Contents and wait until Network comes back.
This works actually quite nice - but sadly, SHAKA does not like this :)
When Network turns off, we try with pause() to pause the Player - mostly, an Error from SHAKA is already triggered, but we were able to ignore this.
Nevertheless, problematic is the Return of the Internet. Afer being sure, Internet is back, we seek -5 Seconds and start Playback again (that works also), but once the Parts are reached, that were previously not being available because of being Offline (I think), SHAKA stops and nothing happens.
So, summing it up - is there any way to purge the internal Cache or force SHAKA to reload Segments or make SHAKA not cache/download/try anything when !navigator.onLine ?

Thanks a lot!
Christoph

@joeyparrish
Copy link
Member

Hi Christoph,

First, let me explain what Shaka is doing.

Shaka continues to buffer up to the bufferingGoal setting even when paused. It doesn't check navigator.onLine, either. We also don't cache anything, so if we fail to fetch a segment, there is no reason that failure should "stick". We should be able to fetch those same segments once the network is back.

We don't check navigator.onLine in StreamingEngine because the same streaming logic is used for content that has been stored in a database for offline playback. If we didn't stream during navigator.onLine == false, offline playback from the database would not be possible.

I can reproduce your issue with VOD content, but not with live:

https://shaka-player-demo.appspot.com/demo/#asset=//vm2.dashif.org/livesim/utc_head/testpic_2s/Manifest.mpd;lang=en-US

It looks like this was introduced in PR #842, which was meant to address issues #830 and #762. In #830, the complaint was that we kept retrying on VOD even after a failure. So it sounds like you want exactly the opposite behavior.

#762 was reopened with a discussion about adding a method to ask the player to retry streaming after a failure, but I'm not sure if that's the best way to go or not.

Let me consider the best way to allow each application to choose the desired behavior, and I'll let you know what we come up with. Thanks!

@boredom2
Copy link
Author

Thanks for these Insights - and yes, I understand, that there are potentially completely different desired Behaviours, no doubt about that. Ill stay tuned :)

@joeyparrish
Copy link
Member

@boredom2, I'm closing this issue and merging it into #960, in which I've proposed a more general solution. Please provide feedback there. Thanks!

@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
Projects
None yet
Development

No branches or pull requests

3 participants