Improved YT initialized check.
Added an extra check to see wether YT API has been initialized. The current check is inadequate as YT can be an object while the API still isn't completely initialized.
This commit is contained in:
parent
ac0061b83e
commit
152e94f229
@ -1382,7 +1382,7 @@
|
||||
container.setAttribute('id', id);
|
||||
|
||||
// Setup API
|
||||
if (typeof YT === 'object') {
|
||||
if (typeof YT === 'object' && YT.loaded !== 0) {
|
||||
_youTubeReady(mediaId, container);
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user