I have a modal with a video inside, it has a poster image and does not play on auto, when the user clicks play it is muted, the user needs to unmute it rather.
So all good thats all working great, however if the user plays the video and they unmute it etc, if they close the modal while the video is playing the video does not pause.
I have tried the dmx-on:hide-bs-modal and the dmx-on:hidden-bs-modal one at a time as well as with both together. I have placed this on the modal itself.
To be honest @brad, I never found a solution to the issue and it still exists on that site, however luckily there are so few people that actually play the videos that I kind of just left it assuming at some point one of the updates would fix it.
Haha, very lazy solution, I know, but just had a million other things I was juggling at that time and pretty much forgot about the problem.
If you do find a fix, please be sure to also let me know.
Yeah luckily I only have a 30 second video. I don’t understand why it won’t pause when the modal is closed. I used. the same method you did and no luck. Maybe it’s a bug?
I am assuming it must be a bug too, maybe @Teodor could have a little test with stopping a video playing on modal close regardless of if the modal is closed with a proper close button or X button or just clicking in the opaque area to close it.
Going to test it out on mine but the one difference between your code and mine is that yours does not seem to include the modal ID, while mine does, so just going to check what the picker chooses by default and then try change the target to only the video ID.
Will report back what happens, thanks for testing this Patrick.
Results
Using the data bindings picker when i created the project initially produced this
So although it altered, unfortunately mine still does not seem to work correctly though, just like Brads, it does not pause on close, going to fiddle a little.
If you get a moment Patrick maybe could you check the home page of https://www.africacollection.com/ and just a little way down you will find 6 blocks, one called Go Big Game Fishing… which is the one i am testing with.
Well I just got it working, so it seems the data bindings picker does not like the way my video is positioned in a conditional region, so manually adding the ID of the conditional region gets this working as expected.
like this.