Browse Source

updated package.json to reflect master hls deps

fixed a typo in src/videojs-contrib-hls
fixed some inconsistencies in test/videojs-contrib-hls
pull/6/head
brandonocasey 10 years ago
parent
commit
941e5b0d69
  1. 8
      package.json
  2. 4
      src/videojs-contrib-hls.js
  3. 9
      test/videojs-contrib-hls.test.js

8
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",

4
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 = {

9
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,

Loading…
Cancel
Save