Autofocus on video
This commit is contained in:
parent
04926c41fc
commit
72fe1dbab1
|
@ -29,7 +29,8 @@
|
||||||
|
|
||||||
player = vd.setup(args[0], {
|
player = vd.setup(args[0], {
|
||||||
v: args[1] + "/manifest.mpd",
|
v: args[1] + "/manifest.mpd",
|
||||||
t: parseInt(args[2], 10) || 0
|
t: parseInt(args[2], 10) || 0,
|
||||||
|
focus: true
|
||||||
});
|
});
|
||||||
} else if (time !== undefined ){
|
} else if (time !== undefined ){
|
||||||
player.currentTime(time);
|
player.currentTime(time);
|
||||||
|
|
4
js/vd.js
4
js/vd.js
|
@ -276,6 +276,10 @@ const vd = (function() {
|
||||||
type: 'application/dash+xml'
|
type: 'application/dash+xml'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (args.focus === true) {
|
||||||
|
player.focus();
|
||||||
|
}
|
||||||
|
|
||||||
player._oldRequestFullscreen = player.requestFullscreen;
|
player._oldRequestFullscreen = player.requestFullscreen;
|
||||||
player.requestFullscreen = function() {
|
player.requestFullscreen = function() {
|
||||||
var player = document.getElementById(this.id());
|
var player = document.getElementById(this.id());
|
||||||
|
|
Loading…
Reference in New Issue