removing linebreak after parens lines
Showing
2 changed files
with
10 additions
and
14 deletions
... | @@ -74,11 +74,10 @@ const updateMaster = function(master, media) { | ... | @@ -74,11 +74,10 @@ const updateMaster = function(master, media) { |
74 | // if the update could overlap existing segment information, | 74 | // if the update could overlap existing segment information, |
75 | // merge the two lists | 75 | // merge the two lists |
76 | if (playlist.segments) { | 76 | if (playlist.segments) { |
77 | result.playlists[i].segments = updateSegments( | 77 | result.playlists[i].segments = updateSegments(playlist.segments, |
78 | playlist.segments, | ||
79 | media.segments, | 78 | media.segments, |
80 | media.mediaSequence - playlist.mediaSequence | 79 | media.mediaSequence - |
81 | ); | 80 | playlist.mediaSequence); |
82 | } | 81 | } |
83 | changed = true; | 82 | changed = true; |
84 | } | 83 | } |
... | @@ -518,8 +517,8 @@ export default class PlaylistLoader extends Stream { | ... | @@ -518,8 +517,8 @@ export default class PlaylistLoader extends Stream { |
518 | // so fallback to interpolating between the segment index | 517 | // so fallback to interpolating between the segment index |
519 | // based on the known span of the timeline we are dealing with | 518 | // based on the known span of the timeline we are dealing with |
520 | // and the number of segments inside that span | 519 | // and the number of segments inside that span |
521 | return startIndex + Math.floor( | 520 | return startIndex + Math.floor(((originalTime - knownStart) / |
522 | ((originalTime - knownStart) / (knownEnd - knownStart)) * | 521 | (knownEnd - knownStart)) * |
523 | (endIndex - startIndex)); | 522 | (endIndex - startIndex)); |
524 | } | 523 | } |
525 | 524 | ... | ... |
... | @@ -152,11 +152,9 @@ export const duration = function(playlist, endSequence, includeTrailingTime) { | ... | @@ -152,11 +152,9 @@ export const duration = function(playlist, endSequence, includeTrailingTime) { |
152 | } | 152 | } |
153 | 153 | ||
154 | // calculate the total duration based on the segment durations | 154 | // calculate the total duration based on the segment durations |
155 | return intervalDuration( | 155 | return intervalDuration(playlist, |
156 | playlist, | ||
157 | endSequence, | 156 | endSequence, |
158 | includeTrailingTime | 157 | includeTrailingTime); |
159 | ); | ||
160 | }; | 158 | }; |
161 | 159 | ||
162 | /** | 160 | /** |
... | @@ -187,10 +185,9 @@ export const seekable = function(playlist) { | ... | @@ -187,10 +185,9 @@ export const seekable = function(playlist) { |
187 | // of content from the end of the playlist | 185 | // of content from the end of the playlist |
188 | // https://tools.ietf.org/html/draft-pantos-http-live-streaming-16#section-6.3.3 | 186 | // https://tools.ietf.org/html/draft-pantos-http-live-streaming-16#section-6.3.3 |
189 | start = intervalDuration(playlist, playlist.mediaSequence); | 187 | start = intervalDuration(playlist, playlist.mediaSequence); |
190 | end = intervalDuration( | 188 | end = intervalDuration(playlist, |
191 | playlist, | 189 | playlist.mediaSequence + |
192 | playlist.mediaSequence + Math.max(0, playlist.segments.length - 3) | 190 | Math.max(0, playlist.segments.length - 3)); |
193 | ); | ||
194 | return createTimeRange(start, end); | 191 | return createTimeRange(start, end); |
195 | }; | 192 | }; |
196 | 193 | ... | ... |
-
Please register or sign in to post a comment