Adding _ to func names to indicate private scope
Showing
1 changed file
with
6 additions
and
6 deletions
... | @@ -171,7 +171,7 @@ videojs.Hls.prototype.src = function(src) { | ... | @@ -171,7 +171,7 @@ videojs.Hls.prototype.src = function(src) { |
171 | // a loadedplaylist event, we will call translateMediaIndex and | 171 | // a loadedplaylist event, we will call translateMediaIndex and |
172 | // maintain our position at the live point. | 172 | // maintain our position at the live point. |
173 | if (this.duration() === Infinity && this.mediaIndex === 0) { | 173 | if (this.duration() === Infinity && this.mediaIndex === 0) { |
174 | this.mediaIndex = videojs.Hls.getMediaIndexForLive(oldMediaPlaylist); | 174 | this.mediaIndex = videojs.Hls.getMediaIndexForLive_(oldMediaPlaylist); |
175 | } | 175 | } |
176 | 176 | ||
177 | selectedPlaylist = this.selectPlaylist(); | 177 | selectedPlaylist = this.selectPlaylist(); |
... | @@ -247,7 +247,7 @@ videojs.Hls.prototype.src = function(src) { | ... | @@ -247,7 +247,7 @@ videojs.Hls.prototype.src = function(src) { |
247 | /* Returns the media index for the live point in the current playlist, and updates | 247 | /* Returns the media index for the live point in the current playlist, and updates |
248 | the current time to go along with it. | 248 | the current time to go along with it. |
249 | */ | 249 | */ |
250 | videojs.Hls.getMediaIndexForLive = function(selectedPlaylist) { | 250 | videojs.Hls.getMediaIndexForLive_ = function(selectedPlaylist) { |
251 | if (!selectedPlaylist.segments) { | 251 | if (!selectedPlaylist.segments) { |
252 | return 0; | 252 | return 0; |
253 | } | 253 | } |
... | @@ -292,8 +292,8 @@ videojs.Hls.prototype.play = function() { | ... | @@ -292,8 +292,8 @@ videojs.Hls.prototype.play = function() { |
292 | } | 292 | } |
293 | 293 | ||
294 | if (this.duration() === Infinity && this.playlists.media() && !this.player().hasClass('vjs-has-started')) { | 294 | if (this.duration() === Infinity && this.playlists.media() && !this.player().hasClass('vjs-has-started')) { |
295 | this.mediaIndex = videojs.Hls.getMediaIndexForLive(this.playlists.media()); | 295 | this.mediaIndex = videojs.Hls.getMediaIndexForLive_(this.playlists.media()); |
296 | this.setCurrentTime(this.getCurrentTimeByMediaIndex(this.playlists.media(), this.mediaIndex)); | 296 | this.setCurrentTime(this.getCurrentTimeByMediaIndex_(this.playlists.media(), this.mediaIndex)); |
297 | } | 297 | } |
298 | 298 | ||
299 | // delegate back to the Flash implementation | 299 | // delegate back to the Flash implementation |
... | @@ -953,7 +953,7 @@ videojs.Hls.translateMediaIndex = function(mediaIndex, original, update) { | ... | @@ -953,7 +953,7 @@ videojs.Hls.translateMediaIndex = function(mediaIndex, original, update) { |
953 | 953 | ||
954 | if (translatedMediaIndex >= update.segments.length || translatedMediaIndex < 0) { | 954 | if (translatedMediaIndex >= update.segments.length || translatedMediaIndex < 0) { |
955 | // recalculate the live point if the streams are too far out of sync | 955 | // recalculate the live point if the streams are too far out of sync |
956 | return videojs.Hls.getMediaIndexForLive(update) + 1; | 956 | return videojs.Hls.getMediaIndexForLive_(update) + 1; |
957 | } | 957 | } |
958 | 958 | ||
959 | // sync on media sequence | 959 | // sync on media sequence |
... | @@ -999,7 +999,7 @@ videojs.Hls.getMediaIndexByTime = function(playlist, time) { | ... | @@ -999,7 +999,7 @@ videojs.Hls.getMediaIndexByTime = function(playlist, time) { |
999 | * @param mediaIndex {number} The index of the target segment in the playlist. | 999 | * @param mediaIndex {number} The index of the target segment in the playlist. |
1000 | * @returns {number} The current time to that point, or 0 if none appropriate. | 1000 | * @returns {number} The current time to that point, or 0 if none appropriate. |
1001 | */ | 1001 | */ |
1002 | videojs.Hls.prototype.getCurrentTimeByMediaIndex = function(playlist, mediaIndex) { | 1002 | videojs.Hls.prototype.getCurrentTimeByMediaIndex_ = function(playlist, mediaIndex) { |
1003 | var index, time = 0; | 1003 | var index, time = 0; |
1004 | 1004 | ||
1005 | if (!playlist.segments || mediaIndex === 0) { | 1005 | if (!playlist.segments || mediaIndex === 0) { | ... | ... |
-
Please register or sign in to post a comment