diff --git a/index.html b/index.html
index 1c9553d..e0d4b81 100644
--- a/index.html
+++ b/index.html
@@ -25,6 +25,12 @@
}
});
+ Object.defineProperty(HTMLElement.prototype, "document", {
+ get: function() {
+ return document;
+ }
+ });
+
var app = Elm.Main.init({
node: document.getElementById('container'),
});
@@ -81,6 +87,14 @@
const video = document.getElementById('video');
video.currentTime = arg;
});
+
+ app.ports.requestFullscreen.subscribe(function() {
+ document.getElementById('full').requestFullscreen();
+ });
+
+ app.ports.exitFullscreen.subscribe(function() {
+ document.exitFullscreen();
+ });