cinera_player_pre.js: Fix YouTube initialisation
Initialise the player if the YouTube API loads before us
This commit is contained in:
parent
c839e2ed85
commit
ee788b0c30
|
@ -23,7 +23,7 @@ typedef struct
|
|||
version CINERA_APP_VERSION = {
|
||||
.Major = 0,
|
||||
.Minor = 10,
|
||||
.Patch = 0
|
||||
.Patch = 1
|
||||
};
|
||||
|
||||
#include <stdarg.h> // NOTE(matt): varargs
|
||||
|
|
|
@ -633,6 +633,12 @@ Player.initializePlatform = function(platform_id, callback) {
|
|||
callback();
|
||||
} break;
|
||||
case vod_platform.YOUTUBE:
|
||||
{
|
||||
if(window.YT && window.YT.loaded)
|
||||
{
|
||||
callback()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (window.APYoutubeAPIReady === undefined) {
|
||||
window.APYoutubeAPIReady = false;
|
||||
|
@ -648,6 +654,7 @@ Player.initializePlatform = function(platform_id, callback) {
|
|||
} else if (window.APYoutubeAPIReady === true) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue