Browse Source

Switch to using options to detect preload settings

Before the Flash runtime is available, player.preload() returns undefined. Switch to player.options().preload to find out what the "desired" setting is, instead of the current value.
pull/6/head
David LaPalomento 10 years ago
parent
commit
9ddef59c03
  1. 2
      package.json
  2. 3
      src/videojs-hls.js

2
package.json

@ -45,6 +45,6 @@
"dependencies": {
"pkcs7": "^0.2.2",
"videojs-contrib-media-sources": "^1.0.0",
"videojs-swf": "^4.6.0"
"videojs-swf": "^4.7.0"
}
}

3
src/videojs-hls.js

@ -556,7 +556,8 @@ videojs.Hls.prototype.fillBuffer = function(offset) {
segmentUri;
// if preload is set to "none", do not download segments until playback is requested
if (!player.hasClass('vjs-has-started') && player.preload() === "none") {
if (!player.hasClass('vjs-has-started') &&
player.options().preload === 'none') {
return;
}

Loading…
Cancel
Save