MovieNight/static/js/video.js

18 lines
425 B
JavaScript
Raw Normal View History

/// <reference path="./both.js" />
function initPlayer() {
if (flvjs.isSupported()) {
var videoElement = document.getElementById("videoElement");
var flvPlayer = flvjs.createPlayer({
type: "flv",
url: "/live"
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play();
}
}
window.addEventListener("load", initPlayer);