Make streaming work & much more elegant

This commit is contained in:
2022-04-17 10:12:50 -04:00
parent 76c8876bd8
commit 507d4232f0
14 changed files with 2373 additions and 214 deletions

View File

@@ -120,7 +120,7 @@ ul.nav {
margin-left: auto;
}
#streamStage {
max-height: 100%;
/* max-height: 100%; */
right: 0;
}
#msgStage {

View File

@@ -1,3 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<head>

File diff suppressed because one or more lines are too long

View File

@@ -8,13 +8,5 @@ function changeStream() {
function startStream() {
const canvas = document.getElementById('streamStage');
const payload = {
width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
};
sendCmd('/camera/stream', 'POST', payload).then((camera) => {
const streamPort = JSON.parse(camera);
player = new JSMpeg.Player('ws://' + document.location.hostname + ':' + streamPort, {canvas:canvas});
});
player = new JSMpeg.Player('ws://' + document.location.host + '/stream', {canvas:canvas});
}