archive
This commit is contained in:
17
MovieNight/static/js/video.js
Executable file
17
MovieNight/static/js/video.js
Executable file
@@ -0,0 +1,17 @@
|
||||
/// <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);
|
||||
Reference in New Issue
Block a user