formatting fixes
Showing
1 changed file
with
3 additions
and
8 deletions
... | @@ -120,19 +120,14 @@ var | ... | @@ -120,19 +120,14 @@ var |
120 | }; | 120 | }; |
121 | 121 | ||
122 | player.hls.selectSegmentByTime = function(time) { | 122 | player.hls.selectSegmentByTime = function(time) { |
123 | if(player.hls.media && player.hls.media.segments) | ||
124 | { | ||
125 | var index, currentSegment; | 123 | var index, currentSegment; |
126 | 124 | ||
127 | for (index = 0; index < player.hls.media.segments.length; index++) | 125 | if (player.hls.media && player.hls.media.segments) { |
128 | { | 126 | for (index = 0; index < player.hls.media.segments.length; index++) { |
129 | currentSegment = player.hls.media.segments[index]; | 127 | currentSegment = player.hls.media.segments[index]; |
130 | 128 | if (time > currentSegment.timeRange.start && time <= currentSegment.timeRange.end) { | |
131 | if(time > currentSegment.timeRange.start && time <= currentSegment.timeRange.end) | ||
132 | { | ||
133 | return index; | 129 | return index; |
134 | } | 130 | } |
135 | |||
136 | } | 131 | } |
137 | } | 132 | } |
138 | }; | 133 | }; | ... | ... |
-
Please register or sign in to post a comment