Open flowplayer in fancybox

Flowplayer is a good choice when it comes to embedding videos into websites, …but what about flowplayer in fancybox ?

If you google a bit certainly you’ll find some ideas of how to play a video in flowplayer in fancybox, but by far the most simple one and the one that gives you the control on every option of every movie embedded, is to embed each of your videos in one different page (ex. lets say we have movie1.mp4 and movie2.mp4 then we should have /movie1.html and /movie2.html or if you have just one video then just one page ), and then set the ‘href’ of the link that is supposed to open that video to the URL of the video page, and now when you click on the link it will open the video page in an iframe in the modalbox. To easily understand this see the demo.

Take note of the snippet of code bellow when you set fancybox.

$("#video-link").fancybox({
	'width' : 336,
	'height' : 256,
	'overlayShow' : false,
	'autoScale' : false,
	'transitionIn' : 'none',
	'transitionOut' : 'none',
	'type' : 'iframe' //tweek the other, do not change this;
});

Demo

Leave a Reply

Your email address will not be published. Required fields are marked *

41 + = 44

This site uses Akismet to reduce spam. Learn how your comment data is processed.