diff options
Diffstat (limited to 'assets/js')
| -rw-r--r-- | assets/js/player.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/assets/js/player.js b/assets/js/player.js index e03ab89c..1c6e336c 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -21,6 +21,7 @@ var options = { ] }, html5: { + preloadTextTracks: false, hls: { overrideNative: true } @@ -430,17 +431,17 @@ window.addEventListener('keydown', e => { case 'ArrowRight': case 'MediaFastForward': - action = skip_seconds.bind(this, 5); + action = skip_seconds.bind(this, 5 * player.playbackRate()); break; case 'ArrowLeft': case 'MediaTrackPrevious': - action = skip_seconds.bind(this, -5); + action = skip_seconds.bind(this, -5 * player.playbackRate()); break; case 'l': - action = skip_seconds.bind(this, 10); + action = skip_seconds.bind(this, 10 * player.playbackRate()); break; case 'j': - action = skip_seconds.bind(this, -10); + action = skip_seconds.bind(this, -10 * player.playbackRate()); break; case '0': @@ -548,6 +549,13 @@ if (player.share) { player.share(shareOptions); } +// show the preferred caption by default +if (player_data.preferred_caption_found) { + player.ready(() => { + player.textTracks()[1].mode = 'showing'; + }); +} + // Safari audio double duration fix if (navigator.vendor == "Apple Computer, Inc." && video_data.params.listen) { player.on('loadedmetadata', function () { |
