9ddef59c by David LaPalomento

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.
1 parent 5f338d57
...@@ -45,6 +45,6 @@ ...@@ -45,6 +45,6 @@
45 "dependencies": { 45 "dependencies": {
46 "pkcs7": "^0.2.2", 46 "pkcs7": "^0.2.2",
47 "videojs-contrib-media-sources": "^1.0.0", 47 "videojs-contrib-media-sources": "^1.0.0",
48 "videojs-swf": "^4.6.0" 48 "videojs-swf": "^4.7.0"
49 } 49 }
50 } 50 }
......
...@@ -556,7 +556,8 @@ videojs.Hls.prototype.fillBuffer = function(offset) { ...@@ -556,7 +556,8 @@ videojs.Hls.prototype.fillBuffer = function(offset) {
556 segmentUri; 556 segmentUri;
557 557
558 // if preload is set to "none", do not download segments until playback is requested 558 // if preload is set to "none", do not download segments until playback is requested
559 if (!player.hasClass('vjs-has-started') && player.preload() === "none") { 559 if (!player.hasClass('vjs-has-started') &&
560 player.options().preload === 'none') {
560 return; 561 return;
561 } 562 }
562 563
......