Merge branch 'master' into patch-1

This commit is contained in:
Perflyst 2021-02-26 19:59:16 +01:00 committed by GitHub
commit bcb44ab600
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 735 additions and 384 deletions

View file

@ -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 () {