Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e904efed
authored
2014-07-17 12:07:04 -0700
by
Tom Johnson
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update documentation for the getMediaIndexByTime routine
1 parent
94e6acea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
e904efe
...
...
@@ -608,11 +608,14 @@ videojs.Hls.translateMediaIndex = function(mediaIndex, original, update) {
};
/**
* TODO - Document this great feature.
* Determine the media index in one playlist by a time in seconds. This
* function iterates through the segments of a playlist and creates TimeRange
* objects for each and then returns the most appropriate segment index by
* checking the time value versus each range.
*
* @param playlist
* @param time
* @returns int
* @param playlist
- The playlist of the segments being searched.
* @param time
- The time in seconds of what segment you want.
* @returns int
- The media index, or -1 if none appropriate.
*/
videojs
.
Hls
.
getMediaIndexByTime
=
function
(
playlist
,
time
)
{
var
index
,
counter
,
timeRanges
,
currentSegmentRange
;
...
...
Please
register
or
sign in
to post a comment