|
@ -138,6 +138,15 @@ socket.on('data', (data) => { |
|
|
console.log('Data received: ',data); |
|
|
console.log('Data received: ',data); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
socket.on('battery', (data) => { |
|
|
|
|
|
console.log('Data received: ',data); |
|
|
|
|
|
var canvas = document.getElementById("textoverlay"); |
|
|
|
|
|
var ctx = canvas.getContext("2d"); |
|
|
|
|
|
ctx.font = "24px Arial"; |
|
|
|
|
|
ctx.fillStyle = "blue"; |
|
|
|
|
|
ctx.fillText(data, canvas.width/3, 30); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
function playStream(videoElement, hostname, port, path, configuration, reportErrorCB) { |
|
|
function playStream(videoElement, hostname, port, path, configuration, reportErrorCB) { |
|
|
var l = window.location; |
|
|
var l = window.location; |
|
|
var wsHost = (hostname != undefined) ? hostname : l.hostname; |
|
|
var wsHost = (hostname != undefined) ? hostname : l.hostname; |
|
|