You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
945 B

4 years ago
<html>
<head>
<link rel="stylesheet" type="text/css" href="/player/asciinema-player.css" />
4 years ago
</head>
4 years ago
<body onLoad="GetVideo()">
4 years ago
<asciinema-player id="p1" title="Linux" author="swarmlab.io" author-url="http://www.swarmlab.io" font-size="small" speed="2" theme="monokai"></asciinema-player>
4 years ago
<script src="/player/asciinema-player.js"></script>
4 years ago
<script>
4 years ago
function GetVideo() {
var url_string = window.location.href
var url = new URL(url_string);
var item = url.searchParams.get("item");
var llo = url.searchParams.get("llo");
var src = '/player/'+llo+'/'+item+'.cast'
4 years ago
4 years ago
var video = document.getElementById('p1');
4 years ago
video.setAttribute('src', src);
//document.querySelector("#p1").setAttribute("src", src);
4 years ago
document.getElementById('p1').addEventListener('canplaythrough', function(e) {
document.getElementById('p1').play()
console.log("all ready to play");
})
4 years ago
}
4 years ago
4 years ago
4 years ago
</script>
4 years ago
</body>
</html>