full screen video play back on nivo lightbox

698 views Asked by At

I am using the nivo lightbox in my theme I have added a youtube video link , when user clicks on button video starts to play. But it is not playing on full screen. How can I make the video play full screen on nevo lightbox? thanks

1

There are 1 answers

0
Ian Onvlee On

I noticed that nobody gives an answer to this question anywhere and I needed it too. Vimeo goes fine but Youtube specically needs the iframe's allowfullscreen="true", so I looked into the code of jquery.nivo.js (and/or jquery.nivo.min.js if you use it). search for "$('<iframe>', and add the option allowfullscreen: true, Do this search twice and repeat this addition a second time further down. allowfullscreen: 'true', gives the same result, no problem. Whether a boolean (true) or a string ('true') doesn't matter. jquery picks up the additional option flauwlessly and youtube videos will show their fullscreen button nicely. It was probably forgotten by the makers of the nivo lightbox. To add it in the min.js I simply broke the single line in two parts, search for the var and added the option without spaces, after which I concatenated the two parts back again. Works flawlessly. I've used the boolean method but have no special reasons. It may be a fraction faster than the string.