Actually don't downswitch
Showing
1 changed file
with
15 additions
and
12 deletions
... | @@ -113,20 +113,23 @@ videojs.Hls.prototype.handleSourceOpen = function() { | ... | @@ -113,20 +113,23 @@ videojs.Hls.prototype.handleSourceOpen = function() { |
113 | 113 | ||
114 | oldMediaPlaylist = this.playlists.media(); | 114 | oldMediaPlaylist = this.playlists.media(); |
115 | 115 | ||
116 | if (this.bandwidth !== this.playlists.bandwidth || | 116 | if (this.bandwidth !== this.playlists.bandwidth) { |
117 | (this.bandwidth && this.bandwidth < this.playlists.bandwidth)) { | 117 | if (this.bandwidth !== undefined && this.bandwidth < this.playlists.bandwidth) { |
118 | this.bandwidth = this.playlists.bandwidth; | 118 | this.bandwidth = this.playlists.bandwidth; |
119 | 119 | ||
120 | selectedPlaylist = this.selectPlaylist(); | 120 | selectedPlaylist = this.selectPlaylist(); |
121 | if (selectedPlaylist === oldMediaPlaylist) { | 121 | if (selectedPlaylist === oldMediaPlaylist) { |
122 | this.fillBuffer(); | ||
123 | } else { | ||
124 | this.playlists.media(selectedPlaylist); | ||
125 | loaderHandler = videojs.bind(this, function() { | ||
126 | this.fillBuffer(); | 122 | this.fillBuffer(); |
127 | this.playlists.off('loadedplaylist', loaderHandler); | 123 | } else { |
128 | }); | 124 | this.playlists.media(selectedPlaylist); |
129 | this.playlists.on('loadedplaylist', loaderHandler); | 125 | loaderHandler = videojs.bind(this, function() { |
126 | this.fillBuffer(); | ||
127 | this.playlists.off('loadedplaylist', loaderHandler); | ||
128 | }); | ||
129 | this.playlists.on('loadedplaylist', loaderHandler); | ||
130 | } | ||
131 | } else { | ||
132 | this.fillBuffer(); | ||
130 | } | 133 | } |
131 | } else { | 134 | } else { |
132 | this.fillBuffer(); | 135 | this.fillBuffer(); | ... | ... |
-
Please register or sign in to post a comment