Clean, adds fullscreen button

This commit is contained in:
2021-06-09 17:19:42 +02:00
parent e2df6c1881
commit 2f1cc48b0b
2 changed files with 85 additions and 9 deletions
+14
View File
@@ -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();
});
</script>
</body>
</html>