-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Video autoplays after dynamic import
#8022
Comments
Can confirm we are seeing the same behaviour since updating to 4.13.x the video just starts playing regardless of whether the autoplay attribute is set on the video or not. That commit definitely looks like the culprit as it calls video.play() automatically and there seems to be no way to stop it, we aren't even using cmcd. |
Thanks for the quick response @absidue! Yes, it automatically plays regardless of the autoplay attribute, see the codepen attached. |
b2673fd (shaka-project#7412) introduced a call to video.play() in a function that says "Set start time of load if autoplay is enabled", but the function did not actually check the autoplay attribute. This fixes the oversight. Fixes shaka-project#8022
Thanks for finding the culprit commit. I put up #8024, but it is not well tested because I don't have any projects which use dynamic import like your example. Please check and let me know if this fixes the issue! |
Have you read the FAQ and checked for duplicate open issues?
If the problem is related to FairPlay, have you read the tutorial?
What version of Shaka Player are you using?
4.13.0
and still exists in latest (4.13.2
)Can you reproduce the issue with our latest release version?
Can you reproduce the issue with the latest code from
main
?Are you using the demo app or your own custom app?
If custom app, can you reproduce the issue using our demo app?
What browser and OS are you using?
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
What configuration are you using? What is the output of
player.getNonDefaultConfiguration()
?What did you do?
Import
shaka-player
dynamically, and then attach to a<video>
element and load a videoMinimal reproduction in this codepen or code below:
What did you expect to happen?
What actually happened?
Are you planning to send a PR to fix it?
The text was updated successfully, but these errors were encountered: