4b3dcf60 by David LaPalomento

Clean up whitespace in inner loop

Open a new scope so that we can make a local alias for the first tag left in the segment parser. Avoid breaking lines in weird places.
1 parent 9e12846d
...@@ -394,14 +394,17 @@ var ...@@ -394,14 +394,17 @@ var
394 // FLV tags until we find the one that is closest to the desired 394 // FLV tags until we find the one that is closest to the desired
395 // playback time 395 // playback time
396 if (typeof offset === 'number') { 396 if (typeof offset === 'number') {
397 while (segmentParser.getTags()[0].pts < offset) { 397 (function() {
398 var tag = segmentParser.getTags()[0];
399
400 for (; tag.pts < offset; tag = segmentParser.getTags()[0]) {
398 segmentParser.getNextTag(); 401 segmentParser.getNextTag();
399 } 402 }
400 403
401 // tell the SWF where we will be seeking to 404 // tell the SWF where we will be seeking to
402 player.hls.el().vjs_setProperty('currentTime', 405 player.hls.el().vjs_setProperty('currentTime', tag.pts * 0.001);
403 segmentParser.getTags()[0].pts * 0.001);
404 lastSeekedTime = null; 406 lastSeekedTime = null;
407 })();
405 } 408 }
406 409
407 while (segmentParser.tagsAvailable()) { 410 while (segmentParser.tagsAvailable()) {
......