From 941e5b0d697d85bd84062c2b317daedb22ddb8e4 Mon Sep 17 00:00:00 2001 From: brandonocasey Date: Wed, 24 Feb 2016 16:21:45 -0500 Subject: [PATCH] updated package.json to reflect master hls deps fixed a typo in src/videojs-contrib-hls fixed some inconsistencies in test/videojs-contrib-hls --- package.json | 8 ++++---- src/videojs-contrib-hls.js | 4 +--- test/videojs-contrib-hls.test.js | 9 +-------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 8a4b0954..71b86b1f 100644 --- a/package.json +++ b/package.json @@ -89,10 +89,10 @@ "utils/" ], "dependencies": { - "pkcs7": "^0.2.3", - "video.js": "^5.0.0", + "pkcs7": "^0.2.2", + "video.js": "^5.2.1", "videojs-contrib-media-sources": "^2.4.4", - "videojs-swf": "^5.0.1" + "videojs-swf": "^5.0.0" }, "devDependencies": { "babel": "^5.8.0", @@ -118,7 +118,7 @@ "minimist": "^1.2.0", "npm-run-all": "^1.2.0", "portscanner": "^1.0.0", - "qunitjs": "^1.0.0", + "qunitjs": "^1.18.0", "serve-static": "^1.10.0", "shelljs": "^0.5.3", "sinon": "1.10.2", diff --git a/src/videojs-contrib-hls.js b/src/videojs-contrib-hls.js index e774260b..5489beac 100644 --- a/src/videojs-contrib-hls.js +++ b/src/videojs-contrib-hls.js @@ -811,7 +811,7 @@ export default class HlsHandler extends Component { // the highest bandwidth variant that is just-larger-than // the video player resolutionPlusOne = variant; - resolutionPlusOneAttribute = resolutionPlusOneAttribute.attributes.RESOLUTION; + resolutionPlusOneAttribute = resolutionPlusOne.attributes.RESOLUTION; } } @@ -933,13 +933,11 @@ export default class HlsHandler extends Component { // we have entered a state where we are fetching the same segment, // try to walk forward - /* eslint-disable max-len */ if (this.lastSegmentLoaded_ && this.playlistUriToUrl(this.lastSegmentLoaded_.uri) === this.playlistUriToUrl(segment.uri) && this.lastSegmentLoaded_.byterange === segment.byterange) { return this.fillBuffer(mediaIndex + 1); } - /* eslint-enable max-len */ // package up all the work to append the segment segmentInfo = { diff --git a/test/videojs-contrib-hls.test.js b/test/videojs-contrib-hls.test.js index 618742c9..cdd5cd9b 100644 --- a/test/videojs-contrib-hls.test.js +++ b/test/videojs-contrib-hls.test.js @@ -294,15 +294,11 @@ QUnit.module('HLS -', { videojs.Hls.Decrypter = this.old.Decrypt; videojs.SourceBuffer = this.old.SourceBuffer; - // The clock _must_ be restored before disposing the player; otherwise, - // certain timeout listeners that happen inside video.js may throw errors. - this.clock.restore(); - // XXX TODO WHY!?!?!? this.player.dispose(); this.sinonXHR.restore(); videojs.xhr.XMLHttpRequest = this.old.XHR; - + this.clock.restore(); } }); @@ -1195,7 +1191,6 @@ QUnit.test('selects the correct rendition by player dimensions', function() { this.player.height(360); this.player.tech_.hls.bandwidth = 3000000; - this.clock.tick(1); playlist = this.player.tech_.hls.selectPlaylist(); QUnit.deepEqual(playlist.attributes.RESOLUTION, @@ -1209,7 +1204,6 @@ QUnit.test('selects the correct rendition by player dimensions', function() { this.player.height(1080); this.player.tech_.hls.bandwidth = 3000000; - this.clock.tick(1); playlist = this.player.tech_.hls.selectPlaylist(); QUnit.deepEqual(playlist.attributes.RESOLUTION, @@ -1221,7 +1215,6 @@ QUnit.test('selects the correct rendition by player dimensions', function() { this.player.width(396); this.player.height(224); - this.clock.tick(1); playlist = this.player.tech_.hls.selectPlaylist(); QUnit.deepEqual(playlist.attributes.RESOLUTION,