Merge pull request #121 from videojs/hotfix/documentation
update documentation for the getMediaIndexByTime routine
Showing
1 changed file
with
7 additions
and
4 deletions
... | @@ -608,11 +608,14 @@ videojs.Hls.translateMediaIndex = function(mediaIndex, original, update) { | ... | @@ -608,11 +608,14 @@ videojs.Hls.translateMediaIndex = function(mediaIndex, original, update) { |
608 | }; | 608 | }; |
609 | 609 | ||
610 | /** | 610 | /** |
611 | * TODO - Document this great feature. | 611 | * Determine the media index in one playlist by a time in seconds. This |
612 | * function iterates through the segments of a playlist and creates TimeRange | ||
613 | * objects for each and then returns the most appropriate segment index by | ||
614 | * checking the time value versus each range. | ||
612 | * | 615 | * |
613 | * @param playlist | 616 | * @param playlist {object} The playlist of the segments being searched. |
614 | * @param time | 617 | * @param time {number} The time in seconds of what segment you want. |
615 | * @returns int | 618 | * @returns {number} The media index, or -1 if none appropriate. |
616 | */ | 619 | */ |
617 | videojs.Hls.getMediaIndexByTime = function(playlist, time) { | 620 | videojs.Hls.getMediaIndexByTime = function(playlist, time) { |
618 | var index, counter, timeRanges, currentSegmentRange; | 621 | var index, counter, timeRanges, currentSegmentRange; | ... | ... |
-
Please register or sign in to post a comment