diff options
author | Albin Larsson <mail@albinlarsson.com> | 2018-07-28 03:54:10 +0200 |
---|---|---|
committer | Albin Larsson <mail@albinlarsson.com> | 2018-07-28 04:04:57 +0200 |
commit | 24deff0e2d6f85cfb9a0dfc19444aa66edf8d469 (patch) | |
tree | da22e178c5f6eec7aea62a8b7a37a9130492a94f /src | |
parent | d061be5d2b46dfcb2b84da6ce1fa979647a20353 (diff) | |
download | plyr-24deff0e2d6f85cfb9a0dfc19444aa66edf8d469.tar.lz plyr-24deff0e2d6f85cfb9a0dfc19444aa66edf8d469.tar.xz plyr-24deff0e2d6f85cfb9a0dfc19444aa66edf8d469.zip |
Fix #1108: Make sure youtube.onReady doesn't run twice
Diffstat (limited to 'src')
-rw-r--r-- | src/js/plugins/youtube.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/js/plugins/youtube.js b/src/js/plugins/youtube.js index b521be3c..d380df80 100644 --- a/src/js/plugins/youtube.js +++ b/src/js/plugins/youtube.js @@ -239,6 +239,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; |