# Video plays simultaneously. Stop on play.

**URL:** <https://community.hubspot.com/t/video-plays-simultaneously-stop-on-play/16741>\
**Category:** CMS Development\
**Created:** [October 15, 2019, 7:49am UTC](https://community.hubspot.com/t/video-plays-simultaneously-stop-on-play/16741 "2019-10-15T07:49:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidpru](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/davidpru/32/55716_2.png) [@davidpru](https://community.hubspot.com/u/davidpru)\
**Post date:** [October 15, 2019, 7:49am UTC](https://community.hubspot.com/t/video-plays-simultaneously-stop-on-play/16741/1 "2019-10-15T07:49:57Z")

</div>

Hello, on my website I have a page with 4 videos.

I am using video player on rich text module.

`{% video_player “embed_player”%}`

I need not play videos simultaneously.

When I play in another video, the first video stops.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Tirabuchi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tirabuchi/32/52876_2.png) [@Tirabuchi](https://community.hubspot.com/u/Tirabuchi)\
**Post date:** [October 15, 2019, 10:06am UTC](https://community.hubspot.com/t/video-plays-simultaneously-stop-on-play/16741/2 "2019-10-15T10:06:08Z")

</div>

Hello,  
You will need JS to do that. I do not remember the exact Hubspot-generated video markup, in general you have to manage the onClick event via jQuery on video elements and then stop video playback of every video element BUT the video clicked.

---

<div class="post-metadata">

**Author:** ![davidpru](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/davidpru/32/55716_2.png) [@davidpru](https://community.hubspot.com/u/davidpru)\
**Post date:** [October 15, 2019, 3:02pm UTC](https://community.hubspot.com/t/video-plays-simultaneously-stop-on-play/16741/3 "2019-10-15T15:02:58Z")

</div>

Can you write me the code?

I’m not an expert of javascript.

> **[Clientes - Emburse ES](https://www.emburse.com/es/company/clientes)**
>
> El futuro de la gestión de viajes y gastos empieza con la plataforma de soluciones de software globales de Emburse para gestionar viajes, gastos, facturas y pagos comerciales.

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [October 15, 2019, 4:08pm UTC](https://community.hubspot.com/t/video-plays-simultaneously-stop-on-play/16741/4 "2019-10-15T16:08:02Z")

</div>

Put this javascript into your page. When someone clicks to button to change videos it will pause all playing videos.

```auto
<script>
$('*[data-toggle="pill"]').on('click', function(){
for(var i = 0;i < VidyardV4.players.length; i++){
 VidyardV4.players[i].pause();
}
});
</script>

```

---

<div class="post-metadata">

**Author:** ![davidpru](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/davidpru/32/55716_2.png) [@davidpru](https://community.hubspot.com/u/davidpru)\
**Post date:** [October 17, 2019, 3:35pm UTC](https://community.hubspot.com/t/video-plays-simultaneously-stop-on-play/16741/5 "2019-10-17T15:35:40Z")

</div>

Thanks for your help. I have solved the problem.

I have to learn JS. Only with html and css it is difficult to live.

Very happy for your help.

---

<div class="post-metadata">

**Author:** ![SAlberts](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@SAlberts](https://community.hubspot.com/u/SAlberts)\
**Post date:** [March 9, 2022, 10:48pm UTC](https://community.hubspot.com/t/video-plays-simultaneously-stop-on-play/16741/6 "2022-03-09T22:48:23Z")

</div>

I implemented your js-code on my landingpage but it does not stop the Vidyard player from playing multiple videos simultaneously.  
See the page here: [https://5598614.hs-sites.com/implant-training-videos](https://5598614.hs-sites.com/implant-training-videos)
