add try/catch. fix tests
Showing
1 changed file
with
4 additions
and
0 deletions
... | @@ -390,7 +390,11 @@ var | ... | @@ -390,7 +390,11 @@ var |
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 | if(!videojs.hls.supportsNativeHls) { |
393 | try { | ||
393 | player.el().querySelector('.vjs-tech').vjs_setProperty('duration', player.duration()); | 394 | player.el().querySelector('.vjs-tech').vjs_setProperty('duration', player.duration()); |
395 | } catch (err) { | ||
396 | |||
397 | } | ||
394 | } | 398 | } |
395 | // manually fire the duration change | 399 | // manually fire the duration change |
396 | player.trigger('durationchange'); | 400 | player.trigger('durationchange'); | ... | ... |
-
Please register or sign in to post a comment