I also start and stop the video depending on the payload. this is the code to play and stop the video:
<script>
(function(scope) {
var video = document.getElementById('video');
video.src = "http://tecfa.unige.ch/guides/html/html5-video/videos/state-of-wikipedia-480x272.ogv";
// Watch for messages being send to this template node
scope.$watch('msg', function (msg) {
if (msg.payload=="1") {
video.play();
}
else if(msg.payload=="0"){
//var video = document.getElementById('video');
//video.src = "http://tecfa.unige.ch/guides/html/html5-video/videos/state-of-wikipedia-480x272.ogv";
video.pause();
}
});
})(scope);
</script>
AFAIK - you can't do it with simple CSS.
You need to build it into the page - ege see - https://www.w3schools.com/howto/howto_css_fullscreen_video.asp
So to do that here you probably need to host your own web page (in Node-RED) then embed the dashboard in that.
How do I get my widget to take on the full groups?
my group is 36 wide but I can´t close my widget wider than 27, because I can´t get on the extra rows. But only make the height bigger. Is there a trick?
I run Node-RED on a Raspberry Pi and open the Dashboard on the Pi in the Chromium Browser. But the video runs very jerky, is there a possibility, that the video runs better in Chromium?
Here'a a template for a fullscreen video background with crossfading. It bypasses the Dashboard's layout by using position:fixed so it can be set to 1x1 cell size and remain fullscreen.
Hi Hugo, Is there a way to apply your code to the header so the video plays in the background of all tabs and not just a certain one? My HTML/CSS is not great enough to figure out how to structure it.
If I want to set an image as background of the whole page in a tab, Can you please tell where to post the code and where to save the image that I want as background?
I am using NODE RED in ibm cloud.