b6ede3ac by Brandon Casey

Fix all linter errors in master (#721)

1 parent b2a22fde
...@@ -69,8 +69,7 @@ ...@@ -69,8 +69,7 @@
69 "scripts", 69 "scripts",
70 "utils", 70 "utils",
71 "test/test-manifests.js", 71 "test/test-manifests.js",
72 "test/test-expected.js", 72 "test/test-expected.js"
73 "src/playlist-loader.js"
74 ] 73 ]
75 }, 74 },
76 "files": [ 75 "files": [
......
...@@ -448,6 +448,7 @@ const PlaylistLoader = function(srcUrl, hls, withCredentials) { ...@@ -448,6 +448,7 @@ const PlaylistLoader = function(srcUrl, hls, withCredentials) {
448 for (let groupKey in loader.master.mediaGroups.AUDIO) { 448 for (let groupKey in loader.master.mediaGroups.AUDIO) {
449 for (let labelKey in loader.master.mediaGroups.AUDIO[groupKey]) { 449 for (let labelKey in loader.master.mediaGroups.AUDIO[groupKey]) {
450 let alternateAudio = loader.master.mediaGroups.AUDIO[groupKey][labelKey]; 450 let alternateAudio = loader.master.mediaGroups.AUDIO[groupKey][labelKey];
451
451 if (alternateAudio.uri) { 452 if (alternateAudio.uri) {
452 alternateAudio.resolvedUri = 453 alternateAudio.resolvedUri =
453 resolveUrl(loader.master.uri, alternateAudio.uri); 454 resolveUrl(loader.master.uri, alternateAudio.uri);
......
...@@ -486,7 +486,8 @@ export default class SegmentLoader extends videojs.EventTarget { ...@@ -486,7 +486,8 @@ export default class SegmentLoader extends videojs.EventTarget {
486 // Increment the timeCorrection_ variable to push the fetcher forward 486 // Increment the timeCorrection_ variable to push the fetcher forward
487 // in time and hopefully skip any gaps or flaws in our understanding 487 // in time and hopefully skip any gaps or flaws in our understanding
488 // of the media 488 // of the media
489 let correctionApplied = this.incrementTimeCorrection_(this.playlist_.targetDuration / 2, 1); 489 let correctionApplied =
490 this.incrementTimeCorrection_(this.playlist_.targetDuration / 2, 1);
490 491
491 if (correctionApplied && !this.paused()) { 492 if (correctionApplied && !this.paused()) {
492 this.fillBuffer_(); 493 this.fillBuffer_();
......
...@@ -108,8 +108,8 @@ QUnit.test('calculates the percent buffered for segments in the simple case', fu ...@@ -108,8 +108,8 @@ QUnit.test('calculates the percent buffered for segments in the simple case', fu
108 QUnit.equal(percentBuffered, 40, 'calculated the buffered amount correctly'); 108 QUnit.equal(percentBuffered, 40, 'calculated the buffered amount correctly');
109 }); 109 });
110 110
111 QUnit.test('consider the buffer before currentTime to be filled if the segement begins at ' + 111 QUnit.test('consider the buffer before currentTime to be filled if the ' +
112 'or before the currentTime', function() { 112 'segement begins at or before the currentTime', function() {
113 let segmentStart = 10; 113 let segmentStart = 10;
114 let segmentDuration = 10; 114 let segmentDuration = 10;
115 let currentTime = 15; 115 let currentTime = 15;
...@@ -197,7 +197,8 @@ QUnit.test('calculates the percent buffered as 0 for segments that do not overla ...@@ -197,7 +197,8 @@ QUnit.test('calculates the percent buffered as 0 for segments that do not overla
197 QUnit.equal(percentBuffered, 0, 'calculated the buffered amount correctly'); 197 QUnit.equal(percentBuffered, 0, 'calculated the buffered amount correctly');
198 }); 198 });
199 199
200 QUnit.test('calculates the percent buffered for segments that end before currentTime', function() { 200 QUnit.test('calculates the percent buffered for segments ' +
201 'that end before currentTime', function() {
201 let segmentStart = 10; 202 let segmentStart = 10;
202 let segmentDuration = 10; 203 let segmentDuration = 10;
203 let currentTime = 19.6; 204 let currentTime = 19.6;
......
...@@ -3,7 +3,11 @@ import SegmentLoader from '../src/segment-loader'; ...@@ -3,7 +3,11 @@ import SegmentLoader from '../src/segment-loader';
3 import videojs from 'video.js'; 3 import videojs from 'video.js';
4 import xhrFactory from '../src/xhr'; 4 import xhrFactory from '../src/xhr';
5 import Config from '../src/config'; 5 import Config from '../src/config';
6 import { playlistWithDuration, useFakeEnvironment, useFakeMediaSource } from './test-helpers.js'; 6 import {
7 playlistWithDuration,
8 useFakeEnvironment,
9 useFakeMediaSource
10 } from './test-helpers.js';
7 11
8 let currentTime; 12 let currentTime;
9 let mediaSource; 13 let mediaSource;
......