Clean, adds fullscreen button
This commit is contained in:
+14
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user