Pause video in a dynamic panel widget

Chad Specter shared this question 4 years ago

I have a dynamic widget with two panels (slide_1 and slide_2). I'm using an HTML widget to have a video playing in the background. The video autoplays and loops and has an audio soundtrack. When I switch between the two panels I would like to pause the video in the first and start playing the video in the second. Basically when the video is out of view it is paused. I am using a tag to play the video and know I can use javascript to create the play/pause action, I just don't know how that will work with the code Prototyper creates for the dynamic panel. Here is the code for my widget:

Comments (1)


Hi Chad,

I can't see the code, but have you tried what you are describing?