-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Do not setup up MediaSource in advance of load() #1087
Comments
You can call |
@chrisfillmore if you see the fiddle that I linked I am already calling You can see that the |
We assume that the We will continue to keep the MediaSource attached to the video even after We will not restore the |
It may also be worth considering why you want a fallback from Shaka Player to setting the video src. If the load() failure is caused by a lack of browser support, you should call For a more detailed probe of what the browser does and does not support, you can use You can read more about these methods in the API docs here: https://shaka-player-demo.appspot.com/docs/api/shaka.Player.html |
Thanks for the quick response! @TheModMaker yup as of now that's the approach - using destroy and then resetting the src, but I figured I can't be the only one that needs to rely on a fallback approach. If you think it's a corner case then it doesn't deserve any API support. I'm fine with setting the src myself but interested to hear what the community uses as fallbacks as when this happens it's basically the worst experience of a broken video. @joeyparrish we're already using |
Thanks for the feedback, Peter. A few things worth noting here:
In all likelihood, we will have to scrap advanced MediaSource setup at some point for those features. Since we originally did it for the sake of your application, and since you don't seem to want it any more, it seems like it won't be missed if we remove it in v2.4. For now, I'll mark this as an enhancement for v2.4, rename to reflect the removal of advanced MediaSource setup, and note that this is a prerequisite for the other three features mentioned above. |
Thanks for providing more context, Joey. Where did you get the sense that we didn't want MediaSource set up in advance anymore? |
I'm sorry, maybe I misunderstood. Setting up MediaSource in advance of load() means setting it up in both the Player constructor and in unload(). You can't set up MediaSource without attaching it to the src attribute of a video element. So we can't give you control of src= after unload and set up MediaSource in advance of load(). What would make the most sense from your perspective? |
@joeyparrish apologies for the miscommunication - I wasn't aware of the perf implications until you posted the link to the feedback from 2015. Perf I think would be the highest pri but it seems unfortunate that this design decision impacts the list of features you pointed out. From my perspective perf would be more important than getting control over the src to handle the fallback case. |
Okay, then in that case, I'll try to make sure our design changes offer some way to explicitly setup MediaSource in advance, rather than implicitly, so that applications can take control of the flow. How does that sound? |
Sounds like a perfect balance. Thanks Joey! |
No problem. Sorry for the misunderstanding. |
Here's what I'm building at the moment:
@peterdotjs, what do you think? The default behavior will stay the same, but you will have options to explicitly decide when we take over a video element and when we set up MediaSource. |
This feature will be out in v2.4 this week. |
Have you read the FAQ and checked for duplicate issues:
yes
What version of Shaka Player are you using:
2.2.1
What browser and OS are you using:
Chrome 62, OSX
What did you do?
Force an error when player loads manifest.
What did you expect to happen?
I expect that we should gracefully fall back to behavior prior to using shaka. Possibly expose an API to update video tag back to original state since the player updates the src on initialization.
What actually happened?
Example: https://jsfiddle.net/az7q2x85/3/
Current workaround is to manually update the video src url back to the original.
The text was updated successfully, but these errors were encountered: