MovieNight/static/js/video.js
joeyak 7dca3be538 UI Changes
Changed UI to scale better
Moved info box into a hidden div that shows when the notifyBox is hovered
Added a color button that sends the /color command
Split client.js into separate files that the video and chat call separatly
The reload player button only shows up in chat when there is a video
added references to other code so code complete can work in js files

Fixes #40
2019-03-17 01:55:50 -04:00

18 lines
425 B
JavaScript

/// <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);