Browse Source

server player

master
zeus 4 years ago
parent
commit
268d910fed
  1. 4
      aplayer.html

4
aplayer.html

@ -8,6 +8,8 @@
<script src="/player/asciinema-player.js"></script> <script src="/player/asciinema-player.js"></script>
<script> <script>
function GetVideo() { function GetVideo() {
//document.querySelector("#p1").setAttribute("src", src);
document.getElementById('p1').addEventListener('canplaythrough', function(e) {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
var item = url.searchParams.get("item"); var item = url.searchParams.get("item");
@ -16,8 +18,6 @@
var video = document.getElementById('p1'); var video = document.getElementById('p1');
video.setAttribute('src', src); video.setAttribute('src', src);
//document.querySelector("#p1").setAttribute("src", src);
document.getElementById('p1').addEventListener('canplaythrough', function(e) {
document.getElementById('p1').play() document.getElementById('p1').play()
console.log("all ready to play"); console.log("all ready to play");
}) })

Loading…
Cancel
Save