Skip to content

Commit 67f908a

Browse files
committed
Load media after UI is built
1 parent 65eb5c1 commit 67f908a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/js/source.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,9 @@ const source = {
114114
// HTML5 stuff
115115
if (this.isHTML5) {
116116
// Setup captions
117-
if ('tracks' in input) {
117+
if (Object.keys(input).includes('tracks')) {
118118
source.insertElements.call(this, 'track', input.tracks);
119119
}
120-
121-
// Load HTML5 sources
122-
this.media.load();
123120
}
124121

125122
// If HTML5 or embed but not fully supported, setupInterface and call ready now
@@ -128,6 +125,11 @@ const source = {
128125
ui.build.call(this);
129126
}
130127

128+
if (this.isHTML5) {
129+
// Load HTML5 sources
130+
this.media.load();
131+
}
132+
131133
// Update the fullscreen support
132134
this.fullscreen.update();
133135
},

0 commit comments

Comments
 (0)