I am a nubee on node-red.
I am trying to use node red to control a robot carrying a raspberry pi camera.
Besides the control buttons to move the robot, pan/tilt camera etc, I have also added a video stream window by adding a template node to Dashboard with the code below:
<!DOCTYPE html>
<html>
<head>
<title>Camera Video Stream</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<script>
function errorFunction() {
alert('Stream stopped');
}
</script>
</body>
</html>
I would now like to be able to start/stop the display of this stream by adding a toggle button, but somehow I am stuck. Have tried to go through various forums, etc, but it seems I am out of luck.
Any help would be appreciated.
Thanks in advance.