-
Notifications
You must be signed in to change notification settings - Fork 27
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
[WIP] fix: trigger playback ready event when rendered #75
base: master
Are you sure you want to change the base?
Conversation
I added an additionnal commit to fix an issue with Safari on macOS : it store the user interaction provided by clicking on play (when autoplay is not permitted) before setup the Shaka instance. The main reason is that the load() method will fetch the manifest and therefore will lost the user interaction. (required by core plugins which may require to initalize stuff when user click on play) It is a workaround, otherwise when the playback "PLAY_INTENT" event is triggered, the user interaction is already lost. (this change make the Shaka playback plugin fully compatible with my IMA SDK ad plugin) |
Added minor fix and updated jsDelivr script urls. |
Added |
Change default track label format. Add language in tracks label when required. Ensure tracks are sorted.
Added a commit which hopefully fix #76 . |
Hey @kslimani, thanks for the contribution! I suggest one approach to handle the behavior related to issue #74. Move the code on the Something like:
With this approach, we handle the call of What do you think? |
@joaopaulovieira indeed i missed the I like your approach because it attempt to create the Shaka instance and load the source manifest at render time. (which will avoid the source manifest ajax request when user click to play) The only part i think about is that What do you think ? PS: i rename this PR as "WIP" until this issue is fixed. |
I may not have understood. Can you apply your suggested changes to the PR? |
Let's hold this PR until i have the hand again on mobile/desktop devices (covid-19 containment) to ensure it will works. |
It ensure that "PLAYBACK_READY" event is trigger when plugin is rendered to attempt to be consistent with other playback plugins.
These changes allow the "CORE_READY" event to be trigger before the play() method is called.
I also added some conditions to avoid potential predictable exception(s) on undefined/null properties/method results.
Should fix #74.
I focused on avoiding any backward incompatible changes, but it would be nice to have some code review before merge.