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) {
// load the MediaSource into the player
this.mediaSource.addEventListener('sourceopen', this.handleSourceOpen.bind(this));
// We need to trigger this asynchronously to give others the chance
// to bind to the event when a source is set at player creation
setTimeout(function() {
// Be careful since the player could have been disposed immediately after
// setting the src
if (player && player.el()) {
player.trigger('loadstart');
}
}, 1);
// The index of the next segment to be downloaded in the current
// media playlist. When the current media playlist is live with
// expiring segments, it may be a different value from the media
......