Merge pull request #1131 from friday/1108

Make sure youtube.onReady doesn't run twice
This commit is contained in:
Sam Potts 2018-07-29 00:19:37 +10:00 committed by GitHub
commit 44b5d9f6b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,6 +240,10 @@ const youtube = {
triggerEvent.call(player, player.media, 'ratechange');
},
onReady(event) {
// Bail if onReady has already been called. See issue #1108
if (is.function(player.media.play)) {
return;
}
// Get the instance
const instance = event.target;