use tech.vjs_setProp versus supportsNative for tech detection
Showing
1 changed file
with
3 additions
and
6 deletions
... | @@ -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'); | ... | ... |
-
Please register or sign in to post a comment