Hello All,
I have been trying to get a video on the dashboard that is played only when a trigger is given.
The following Example flow by [BartButenaers]
[{"id":"34ebe5b1.ffe0ca","type":"inject","z":"18e47039.88483","name":"Show first stream","topic":"","payload":"https://storage.googleapis.com/coverr-main/mp4/The-Slow-Dock.mp4","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":620,"y":1140,"wires":[["d4643763.1e4478"]]},{"id":"d4643763.1e4478","type":"ui_template","z":"18e47039.88483","group":"b389df50.19473","name":"Vid_screen","order":28,"width":"6","height":"4","format":"<div>\n <video id=\"video\" width=\"100%\" heigth=\"100%\"></video>\n</div>\n\n<script> \n (function(scope) {\n // Watch for messages being send to this template node\n scope.$watch('msg', function (msg) { \n if (msg) {\n\n var video = document.getElementById('video');\n video.src = msg.payload;\n video.play();\n } \n }); \n })(scope); \n</script>\n\n\n\n","storeOutMessages":false,"fwdInMessages":true,"templateScope":"local","x":830,"y":1140,"wires":[[]]},{"id":"1cd37387.83b0bc","type":"inject","z":"18e47039.88483","name":"Show first stream","topic":"","payload":"https://storage.googleapis.com/coverr-main/mp4/Night-Traffic.mp4","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":620,"y":1180,"wires":[["d4643763.1e4478"]]},{"id":"b389df50.19473","type":"ui_group","z":"","name":"G_2","tab":"12ba52b2.c0ce3d","order":4,"disp":false,"width":"6","collapse":false},{"id":"12ba52b2.c0ce3d","type":"ui_tab","z":"","name":"Drivecamlrgscreen","icon":"dashboard","order":5}]
This flow really works but I dont have google could account, so if anyone can help as to how to play videos form Youtube or github or google drive or the local desktop after a trigger it would be a great help.
Thanking in Anticipation.