Video in Modals - revisited

I’ve checked a number of threads about this subject, but most of them seem to refer to videos embedded in an iframe (youtube/vimeo). I’ve not found a solution that stops a LOCAL video from playing when its containing modal is closed. Anyone know if a solution to this problem has been found. (note to @norm: It would be nice to have this function as standard).


I’m not on my Mac at the moment but I can send you my code later.


@Malachiman Would greatly appreciate if you could.

1 Like

I’ve got the same problem with LOCAL videos. I would have expected that Blocs does this as a standard function, as Blocs supposedly is a software for website graphic designers and not for website coders.

1 Like

@norm is the person to ask for this - hopefully Blocs 4 :wink: :wink: can do this out of the box! But yes agree this should be same for local.

Hi @hendon52, @Pealco has a script on his Blocs Code Website which should solve your problem.

1 Like

@Jerry I could not find the script. What is the name for this script?

Hi @StFoldex, here you go:

1 Like

Hi @Pealco we have not spoken for some time, I am always very grateful for your help in the forum.
I tell you that I have visited and tried your solution to stop the playback of a Youtube video (, but in the latest version of Blocs (3.5.5) I can’t make it work.
I really need the solution to put it inside a Bric Accordion. Could you please take a little time to check that the solution continues to work on Notepad version 3.5.5.
If it works well, I would be very grateful if you could record the entire process in a small video to see where I am going wrong. Because it sure is my mistake.

Kind regards

  • spanish -
    Hola @Pealco hace algún tiempo que no hablamos, siempre le estoy muy agradecido de sus ayudas en el foro.
    Te comento que he visitado y probado su solución para detener la reproducción de un vídeo de Youtube (, pero en la ultima versión de Blocs (3.5.5) no puedo hacer que funcione.
    Realmente la solucion la necesito para ponerla dentro en un Bric Acordeon. Podrías por favor conseguir un poco de tu tiempo para hacer una comprobación de que la solución continua trabajando en la versión 3.5.5 de Blocs.
    Si funciona bien, te estaría muy agradecido si pudieras grabar todo el proceso completo en un pequeño vídeo para poder ver en que me estoy equivocando. Porque seguro que es un error mío.

Saludos cordiales

Hello @Wam there you go a small video implementing the solution, hope it helps you…

And hope @Eldar don’t mind appears in my video…

Hi @Pealco.
Thanks for your help.
My mistake was in the display of the page, used the preview of Blocs and did not use the visualization in the browser.
As always you are a great help in this forum along with other colleagues.
Very grateful, as in other times.

Kind Regards

Hola @Pealco.
Gracias por tu ayuda.
Mi error estaba en la visualización de la página. Utilizada la previsualización de Blocs y no utilizaba la visualización en el navegador.
Como siempre usted es una gran ayuda en este foro junto a otros compañeros.
Muy agradecido, como en otras ocasiones.

Saludos cordiales.

1 Like

I found a solution to the problem but it involves adding scripts and editing the code after publishing the site. If you’re interested I can post the code.

here’s an example of how it works:

You may want to find out why your site load really slow.

Hmm, loaded fine for me, @KBConcepts .

It loaded fast this morning. :slight_smile:

Hi @Jerry ,
sorry for my late reply. I’m totally busy. Thanks for the link. Actually, I did see this on @Pealco website, but if I’m not mistaken the solution is for scrolling down to stop the video. I need it to stop when the modal closes. My video is located in the centre of the modal that fills the screen and there is not enough place to scroll.
I’m looking for a code that says something like: If the modal is closed, then terminate/stop the play of the video.

I know that there is the possibility to store the videos on the server in a different location and embed them in the same way like a YouTube video, but right now I still refuse to do so.

Hi Gary,
thanks for the tips. Though, I’m sorry that I could not check it, because your video plays shortly ca. 5 sec and then not at all. Are there actually different moving pictures or is it a video of a still image? I also could not hear anything. Not sure if your video also has sound. With the cut off of the video’s sound, I could detect if the video has stopped playing or not when closing the modal.

Hi @StFoldex, I’ve used the script here. The video opens in a modal and it stops playing when you close the modal.

Hi @Jerry, this post here opened by @hendon52 refers to LOCAL Videos and NOT videos that are embedded from YouTube. I look for the same solution as @hendon52 does. My videos in Blocs are not embedded from YouTube/Vimeo, hence are LOCALLY and then exported with Blocs and uploaded to the server in the same directory as my website is together with all the other elements of the website that Blocs did put together. All the solutions work for embedded videos from YouTube. That would not be a problem to make it work.

So thanks for your help. But your examples have all the videos embedded from YouTube unless I would have overlooked one.

I think @Malachiman may be working on a custom bric for this. I’m not sure how far away that could be, but let’s wait and see.

1 Like