# Ui-media node and ui-control

**URL:** https://discourse.nodered.org/t/ui-media-node-and-ui-control/63246
**Category:** Dashboard
**Created:** [30 May 2022 11:15 UTC](https://discourse.nodered.org/t/ui-media-node-and-ui-control/63246 "2022-05-30T11:15:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Manu77](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Manu77](https://discourse.nodered.org/u/Manu77)
#### Post date: [30 May 2022 11:15 UTC](https://discourse.nodered.org/t/ui-media-node-and-ui-control/63246/1 "2022-05-30T11:15:24Z")

</div>

Hi I need your help.

I have a video, on the pc and I wanted to put it on the dashboard to run automatically.  
I'm using , node ui-media for the video and I'm also using ui-control to automatically switch between tabs (I have two tabs one with graphics and the other video)

What I intended is that when I opened the video tab it would start automatically, or in the last case it would be running permanently. (but it only starts when I press play)

I already put the options "run on start" does not work  
I already injected with the message according to the node.  
Can anyone tell me, what am I doing wrong?????

 ![ecra](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/19ea6a2237a1dca38e1ad5e22b1dd62631f657b1.jpeg)

---

<div class="post-metadata">

### Author: ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)
#### Post date: [30 May 2022 18:53 UTC](https://discourse.nodered.org/t/ui-media-node-and-ui-control/63246/2 "2022-05-30T18:53:41Z")

</div>

Check with the `Ui_control` if the user switch to the dashboard tab with the media video. (in this example _MyTab_)  
Then send the `play` command to the media player to start playing.  
Something like this, not tested.

```auto
[{"id":"f541cbd5620db72e","type":"ui_media","z":"92b7e6e4944123df","group":"77e5165.15420e8","name":"","width":0,"height":0,"order":9,"category":"","file":"","layout":"adjust","showcontrols":true,"loop":true,"onstart":true,"scope":"local","tooltip":"","x":810,"y":280,"wires":[[]]},{"id":"d06752b974f2c0f3","type":"ui_ui_control","z":"92b7e6e4944123df","name":"","events":"all","x":260,"y":280,"wires":[["798570dc1d6fc934","14d529575f6744c9"]]},{"id":"302f14e41d5399ac","type":"debug","z":"92b7e6e4944123df","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":830,"y":200,"wires":[]},{"id":"798570dc1d6fc934","type":"switch","z":"92b7e6e4944123df","name":"","property":"name","propertyType":"msg","rules":[{"t":"eq","v":"MyTab","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":280,"wires":[["ee08782890b07a9e"],[]]},{"id":"ee08782890b07a9e","type":"change","z":"92b7e6e4944123df","name":"","rules":[{"t":"set","p":"play","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":280,"wires":[["302f14e41d5399ac","f541cbd5620db72e"]]},{"id":"14d529575f6744c9","type":"debug","z":"92b7e6e4944123df","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":430,"y":200,"wires":[]},{"id":"77e5165.15420e8","type":"ui_group","name":"Default","tab":"492f408.019aa4","order":1,"disp":true,"width":"14","collapse":false},{"id":"492f408.019aa4","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/2/c21b70ebfbc9b6305ee2888a4efd5bf2c484b355.png)

---

<div class="post-metadata">

### Author: ![Manu77](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Manu77](https://discourse.nodered.org/u/Manu77)
#### Post date: [31 May 2022 08:59 UTC](https://discourse.nodered.org/t/ui-media-node-and-ui-control/63246/3 "2022-05-31T08:59:02Z")

</div>

Thanks edje11.  
I tried, and also checked if I put the video always running, when the UI-Control switch to the dashboard tab the video starts again automatically.  
Thanks for your help

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [14 June 2022 08:59 UTC](https://discourse.nodered.org/t/ui-media-node-and-ui-control/63246/4 "2022-06-14T08:59:03Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
