1c8468f3 by jrivera

Trigger loadstart

The swf will no longer emit a loadstart event when it is running in "data generation mode"
1 parent a6071b56
...@@ -131,6 +131,16 @@ videojs.Hls.prototype.src = function(src) { ...@@ -131,6 +131,16 @@ videojs.Hls.prototype.src = function(src) {
131 // load the MediaSource into the player 131 // load the MediaSource into the player
132 this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen.bind(this)); 132 this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen.bind(this));
133 133
134 // We need to trigger this asynchronously to give others the chance
135 // to bind to the event when a source is set at player creation
136 setTimeout(function() {
137 // Be careful since the player could have been disposed immediately after
138 // setting the src
139 if (player && player.el()) {
140 player.trigger('loadstart');
141 }
142 }, 1);
143
134 // The index of the next segment to be downloaded in the current 144 // The index of the next segment to be downloaded in the current
135 // media playlist. When the current media playlist is live with 145 // media playlist. When the current media playlist is live with
136 // expiring segments, it may be a different value from the media 146 // expiring segments, it may be a different value from the media
......