Pause or Stop video embed when switching tabs

Hi!

Here is my website: Miks Mastering Online | Świetne Brzmienie Muzyki w 72h There is a section with tabs and each tab has a video inside.

Currently when you play a video on one tab and switch to the other - the video is still playing and you have to go back and turn it off. I’d like to have it turned off automatically when you switch the tab.

Videos are embedded and the lightbox option is not great - I want customers to listen to the music I helped creating and still have the option to scroll the page.

Can someone help me with it? How can I make videos automatically turned off on tab switch?

Here is my site Read-Only: Webflow - Hugiz Records Tomasz Moskalski

Hello.

The solution only by custom code (Basic Viemo/Youtube API to stop/play the video -or- video HTML api).

Hard to answer because it should take some time to write the specific code for this scenario.

@hugiz did you find a solution for this?

It’s custom code as Ezra indicated.

Commonly the solution is to us a mutation observer to detect the tab-content-hidden situation, and then pause any videos within.

For tabs, SA5 has a solution and callback event that can simplify that. Then all you need to do is write your code to pause your video.