Browse Source

server player

master
zeus 4 years ago
parent
commit
7f758e1178
  1. 7
      aplayer.html

7
aplayer.html

@ -2,10 +2,12 @@
<head>
<link rel="stylesheet" type="text/css" href="/player/asciinema-player.css" />
</head>
<body>
<body onLoad="GetVideo()">
<asciinema-player id="p1" title="Linux" author="swarmlab.io" author-url="http://www.swarmlab.io" font-size="small" speed="2" theme="monokai" src="/player/demo.cast"></asciinema-player>
<script src="/player/asciinema-player.js"></script>
<script>
function GetVideo() {
var url_string = window.location.href
var url = new URL(url_string);
var item = url.searchParams.get("item");
@ -14,10 +16,9 @@
var video = document.getElementById('p1');
var source = document.createElement('source');
source.setAttribute('src', src);
video.appendChild(source);
}
</script>

Loading…
Cancel
Save