Move bandwidthupdate event up in loadedmetadata
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -126,6 +126,8 @@ videojs.Hls.prototype.handleSourceOpen = function() { | ... | @@ -126,6 +126,8 @@ videojs.Hls.prototype.handleSourceOpen = function() { |
126 | 126 | ||
127 | oldMediaPlaylist = this.playlists.media(); | 127 | oldMediaPlaylist = this.playlists.media(); |
128 | this.bandwidth = this.playlists.bandwidth; | 128 | this.bandwidth = this.playlists.bandwidth; |
129 | this.trigger('bandwidthupdate'); | ||
130 | |||
129 | selectedPlaylist = this.selectPlaylist(); | 131 | selectedPlaylist = this.selectPlaylist(); |
130 | oldBitrate = oldMediaPlaylist.attributes && | 132 | oldBitrate = oldMediaPlaylist.attributes && |
131 | oldMediaPlaylist.attributes.BANDWIDTH || 0; | 133 | oldMediaPlaylist.attributes.BANDWIDTH || 0; |
... | @@ -155,8 +157,6 @@ videojs.Hls.prototype.handleSourceOpen = function() { | ... | @@ -155,8 +157,6 @@ videojs.Hls.prototype.handleSourceOpen = function() { |
155 | } else { | 157 | } else { |
156 | setupEvents.call(this); | 158 | setupEvents.call(this); |
157 | } | 159 | } |
158 | |||
159 | this.trigger('bandwidthupdate'); | ||
160 | })); | 160 | })); |
161 | 161 | ||
162 | this.playlists.on('error', videojs.bind(this, function() { | 162 | this.playlists.on('error', videojs.bind(this, function() { | ... | ... |
-
Please register or sign in to post a comment