6f5f4a98 by Tom Johnson

use tech.vjs_setProp versus supportsNative for tech detection

1 parent e0fe1387
...@@ -389,12 +389,9 @@ var ...@@ -389,12 +389,9 @@ var
389 // update the duration 389 // update the duration
390 player.duration(totalDuration(playlist)); 390 player.duration(totalDuration(playlist));
391 // tell the flash tech of the new duration 391 // tell the flash tech of the new duration
392 if(!videojs.hls.supportsNativeHls) { 392 var tech = player.el().querySelector('.vjs-tech');
393 try { 393 if(tech.vjs_setProperty) {
394 player.el().querySelector('.vjs-tech').vjs_setProperty('duration', player.duration()); 394 tech.vjs_setProperty('duration', player.duration());
395 } catch (err) {
396
397 }
398 } 395 }
399 // manually fire the duration change 396 // manually fire the duration change
400 player.trigger('durationchange'); 397 player.trigger('durationchange');
......