baker icon indicating copy to clipboard operation
baker copied to clipboard

Best way to see Youtube video on a modal windows

Open xiripi opened this issue 14 years ago • 6 comments

Hi. What's the best way to see youtube videos on a modal windows with close bottom?

thanks

xiripi avatar Apr 26 '12 12:04 xiripi

you mean full screen for video?

add following in your page which contain video.

<script type="text/javascript">
        var vid;
        
        function init() {
            vid = document.getElementById("myVideo");
            vid.addEventListener("loadedmetadata", addFullscreenButton, false);
        }
        
        function addFullscreenButton(){
            goFullscreen();
        }
        
        function goFullscreen() {
            vid.webkitEnterFullscreen();
        }
 </script>

load it in body tag, like <body onload="init();">

and add id="myVideo" to your video.

That's all.

zenz avatar May 02 '12 01:05 zenz

Hi. How to call the video?

kilop avatar May 07 '12 15:05 kilop

in this case, just tap on the video, it will bring the video to full screen and than play. that's all.

zenz avatar May 08 '12 08:05 zenz

I am assuming this is solved :)

Simbul avatar May 21 '12 20:05 Simbul

@zenz do you know to re-use that code in order to display 3 videos in fullscreen?

gmli-eu avatar Jan 16 '14 16:01 gmli-eu

Hello!

Baker has moved! You can find the new issue board here: https://github.com/BakerFramework/baker/issues

Please post there on a new issue to ask for support. :)

folletto avatar Jan 16 '14 17:01 folletto