How to Embedded Youtube Video
closed
K
Kilian Wi
Just add the following script to your theme -> html injection page and replace all .mp4 and .mov files with videos
It works perfectly and fits our need, although I don't know if this breaks other parts or is unintenional.
<script>
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('a[href$=".mp4"], a[href$=".mov"]').forEach(link => {
const video = document.createElement('video');
video.src = link.href;
video.controls = true;
video.style.maxWidth = '100%'; // Optional: makes the video responsive
link.parentNode.replaceChild(video, link);
});
});
</script>
T
TheMet4lGod
If anyone is still having this issue (I was), just use the <video> HTML tags and link to the file in your media folders.
b
bruno
It doesn't work for me even I followed advice from Gemini Loh
Victor Lombardo
I have the same problem
Nicolas Giard
closed
Gemini Loh
Found the solution: Rending Module > Security > Allow iframes
Apa'Kitemona CIMIA
Gemini Loh: Could you send the link, please.
Gemini Loh
Apa'Kitemona CIMIA: https://prnt.sc/vo3f08
Apa'Kitemona CIMIA
Thank you Gemini Loh.
T
Tecsun Yeep
Gemini Loh: Is it still working now? I have no luck seeing the video even after Allow iframes is enabled.