-
Notifications
You must be signed in to change notification settings - Fork 89
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
Caching mechanism isn't working #37
Comments
I'm not 100% sure on the cause, but it's reproducible anytime two different scripts call YT.Player and pass in the same element. If you check your source, I'd bet you'll find another call to YT.Player somewhere in there. I'm working on a fix at the moment that will try and detect if the element has already been associated with a Player object, and if so, to piggyback on to that. YouTube's iframe api keeps track of iframes by their ID or 'widget' + n, where n is a count of players. Hopefully that will rectify your issue, too. |
From a functional view it's quite random. |
Right; I have a fix in the latest release - just pushed it up, but Github appears to be down at the moment. Once it's up, try that version. It now will detect if a YT Player has been registered on that element, and if so, simply attach it's events to it. Can't say it will work the opposite way, but it's still an improvement! Unfortunately, their API doesn't have any kind of checking mechanism in place. |
Take a look at the latest release (8.1.0) and try that. Should fix your issues, and if not, please let me know. |
The caching mechanism, though well intended, isn't working as hoped. This seems to occur whenever we create a new YT.Player, which #36 should address.
The text was updated successfully, but these errors were encountered: