Autofocus on video

This commit is contained in:
Thomas Forgione 2020-10-06 09:54:34 +02:00
parent 04926c41fc
commit 72fe1dbab1
2 changed files with 6 additions and 1 deletions

View File

@ -29,7 +29,8 @@
player = vd.setup(args[0], {
v: args[1] + "/manifest.mpd",
t: parseInt(args[2], 10) || 0
t: parseInt(args[2], 10) || 0,
focus: true
});
} else if (time !== undefined ){
player.currentTime(time);

View File

@ -276,6 +276,10 @@ const vd = (function() {
type: 'application/dash+xml'
});
if (args.focus === true) {
player.focus();
}
player._oldRequestFullscreen = player.requestFullscreen;
player.requestFullscreen = function() {
var player = document.getElementById(this.id());