Browse Source

display battery stats

main
Hendrik Langer 4 years ago
parent
commit
bd0bfc501d
  1. 9
      raspberry/roberto/views/frontend/templates/index.html

9
raspberry/roberto/views/frontend/templates/index.html

@ -138,6 +138,15 @@ socket.on('data', (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) {
var l = window.location;
var wsHost = (hostname != undefined) ? hostname : l.hostname;

Loading…
Cancel
Save