2018-11-02 15:24:39 -04:00
|
|
|
/*jshint esversion: 6 */
|
|
|
|
let player;
|
|
|
|
|
|
|
|
function changeStream() {
|
|
|
|
player.destroy();
|
|
|
|
startStream();
|
|
|
|
}
|
|
|
|
|
|
|
|
function startStream() {
|
|
|
|
const canvas = document.getElementById('streamStage');
|
2022-04-17 10:12:50 -04:00
|
|
|
player = new JSMpeg.Player('ws://' + document.location.host + '/stream', {canvas:canvas});
|
2018-11-02 15:24:39 -04:00
|
|
|
}
|