elm-twitch/index.html

28 lines
849 B
HTML
Raw Normal View History

2020-10-03 18:44:16 +02:00
<!doctype HTML>
<html>
<head>
<title>twitch.tforgione.fr</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
2020-10-04 16:37:01 +02:00
<link href="css/video-js.css" rel="stylesheet">
2020-10-03 18:44:16 +02:00
</head>
<body>
<div id="container"></div>
2020-10-04 16:37:01 +02:00
<script src="js/vd.js"></script>
2020-10-03 18:44:16 +02:00
<script src="js/main.js"></script>
<script>
2020-10-04 16:37:01 +02:00
var app = Elm.Main.init({
2020-10-04 20:20:16 +02:00
node: document.getElementById('container'),
flags: { width: window.innerWidth, height: window.innerHeight }
2020-10-03 18:44:16 +02:00
});
2020-10-04 16:37:01 +02:00
2020-10-04 16:37:47 +02:00
app.ports.registerVideo.subscribe(function(args) {
2020-10-04 17:06:03 +02:00
requestAnimationFrame(function() {
vd.setup(args[0], args[1] + "/manifest.mpd")
});
2020-10-04 16:37:47 +02:00
});
2020-10-03 18:44:16 +02:00
</script>
</body>
</html>