fix issue where video player renders twice (TNL-3064)
This commit is contained in:
@@ -596,7 +596,11 @@ function (VideoPlayer, i18n) {
|
||||
'[Video info]: YouTube returned an error for ' +
|
||||
'video with id "' + self.id + '".'
|
||||
);
|
||||
self.loadHtmlPlayer();
|
||||
// If the video is already loaded in `_waitForYoutubeApi` by the
|
||||
// time we get here, then we shouldn't load it again.
|
||||
if (!self.htmlPlayerLoaded) {
|
||||
self.loadHtmlPlayer();
|
||||
}
|
||||
});
|
||||
|
||||
window.Video.loadYouTubeIFrameAPI(scriptTag);
|
||||
|
||||
Reference in New Issue
Block a user