diff --git a/index.html b/index.html
index 4a9f4e5..24eac68 100644
--- a/index.html
+++ b/index.html
@@ -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);
diff --git a/js/vd.js b/js/vd.js
index fe8e758..512750e 100644
--- a/js/vd.js
+++ b/js/vd.js
@@ -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());