How to stop Youtube video with workflow?

Hello! Thank you very much for your answer! I can see now where was my mistake and your example is really help me to solved that.

Is there any way I can do that for only one video without repeating group? Let say I need that option only for promo video which every user will able to watch it from the index page of my site. As I understood from the previous posts that in order to stop the video I have to use a type as Video or similar. In other words I need to have a video ID in the DB and this is not going to work just if I will type a video ID as a source of my video element. Am I right ?

Thank you for you quick response. I’m really appreciate that you spend your time to help me out with that.

No problem at all :slight_smile:

Yes, if it’s a promo video that won’t be changed frequently, you can use a custom state instead of storing the video in the database.

For example, on the test page there is now just a “watch” button and a popup with one video element. To do this, we can set a custom state on the Video Player, which will be of type: text (list: no), and the value will be the Vimeo ID of your promo video. Setting the state is similar to displaying data, but instead the video is playing based on the value of the custom state (which is the Video ID of your promo video) that you can type/set manually, instead of retrieving using a database query. Hopefully that isn’t too confusing! Here’s the link and a step-by-step:

Editor:
https://bubble.io/page?type=page&name=test&id=testmyappp

Preview:
https://testmyappp.bubbleapps.io/version-test/test

  1. When Watch is clicked →

Element Actions → Set State

The element we’re setting this custom state on is Video A:

And then we create the custom state by clicking “Create a new custom state…”:

You can name this anything you prefer, but I just chose “VideoID” to remember that’s what text should be entered as the value:

Then the value is empty by default:

And we can just type in a video ID for the value (or paste the text there)

The next step is to ‘Show’ the popup right after the state is set:

Then, to ensure the video plays the video we set in the custom state, we can just set the VideoID data source to be the custom state we just set (Video A’s VideoID):

And then we need to make sure the state gets set to empty when the video is closed, so we can use the ‘set state’ action again, leaving the value empty:

And that should work! :slight_smile:

2 Likes

Hello Faye,

This is not confusing at all! Thank you for your amazing explanation, that is really helpful!
Well understood and all works as described!

Once again thank you for your help and have a wonderful time!

2 Likes

Awesome! Glad to hear and it’s no problem at all! :blush:

Hi all, I’m facing this same challenge 4 years later, the only difference being that for “type of content”, there’s no video option. I’m trying to stop Youtube video from playing in my popup which is tied to a repeating group. You can see the app here: onedegreecareers.app
Username: beta
Password: user

Click the “More Info” button to see the popup and associated video.

ANY HELP IS VERY MUCH APPRECIATED. I’ve been stuck on this for 3-4 hours now. Tried everything I can think of.

If it is just that you need the video to stop playing when it’s popup is closed, in the Conditional tab of the video, just add the condition: When the video isn’t visible – Video ID = 0

Now when you close the popup, the video (and sound) will stop playing:
Screenshot_4

6 Likes