-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Youtube: Uncaught TypeError: Cannot redefine property: playbackRate #1108
Comments
I'm guessing onReady is being called twice for some reason. Pretty sure this is in no way connected to posters. |
If someone getting this issue could help out debugging, that would be appreciated. I would try to find out why / if |
Fixed it by adding check for var isVideoReady = false;
onReady: function onReady(event) {
if(!isVideoReady){
isVideoReady = true;
// onReady code here...
}
} |
I wasn't able to replicate it, but have submitted a PR anyway. About your footnotes
All Youtube videos have thumbnail images, but they don't all have the largest resolution. The only way to find out which resolutions are supported is trying. Trying means you get 404's in the console. These aren't Javascript errors. It's just the console trying to be helpful. See #963
That's in their code, and can't be avoided. You'd get that if you used YouTube embeds without Plyr as well. |
@Scrity1976: This should now by in Plyr 3.3.23, but since you're having the issue and I never did you may want to verify this. |
Expected behaviour
No errors playing Youtube videos with Plyr
Actual behaviour
Sometimes Youtube video plays without sound and throws error in console:
Environment
Steps to reproduce
It may be difficult to reproduce this error.
Edit: Also noticed, that not all Youtube videos have thumbnail images, but Plyr always tries to load them, and it causes
Cannot redefine property: playbackRate
error andGET https://img.youtube.com/vi/2tOMS4OdO4c/maxresdefault.jpg 404 () Failed to load resource: the server responded with status of 404 (Not Found)
Edit 2: Also noticed this error together with
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://...'). h.B @ www-widgetapi.js:99
The text was updated successfully, but these errors were encountered: