Make streaming work & much more elegant
This commit is contained in:
		@@ -120,7 +120,7 @@ ul.nav {
 | 
			
		||||
    margin-left: auto;
 | 
			
		||||
}
 | 
			
		||||
#streamStage {
 | 
			
		||||
    max-height: 100%;
 | 
			
		||||
    /* max-height: 100%; */
 | 
			
		||||
    right: 0;
 | 
			
		||||
}
 | 
			
		||||
#msgStage {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,5 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
 | 
			
		||||
<html lang="en">
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								pub/js/jsmpeg.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								pub/js/jsmpeg.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -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});
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user