diff options
Diffstat (limited to 'src/js/source.js')
-rw-r--r-- | src/js/source.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/js/source.js b/src/js/source.js index 8c9fdf44..337c949c 100644 --- a/src/js/source.js +++ b/src/js/source.js @@ -114,12 +114,9 @@ const source = { // HTML5 stuff if (this.isHTML5) { // Setup captions - if ('tracks' in input) { + if (Object.keys(input).includes('tracks')) { source.insertElements.call(this, 'track', input.tracks); } - - // Load HTML5 sources - this.media.load(); } // If HTML5 or embed but not fully supported, setupInterface and call ready now @@ -128,6 +125,11 @@ const source = { ui.build.call(this); } + if (this.isHTML5) { + // Load HTML5 sources + this.media.load(); + } + // Update the fullscreen support this.fullscreen.update(); }, |