Who can share?
Here is the code I have for displaying a video off-center of the screen, and an iframe video without dimensions:
getVideo (id, function (response) {
$ .fancybox ({
// hide the related video suggestions and autoplay the video
// 'href': this.href.replace (new RegExp ('watch \\? v =', 'i'), 'embed /') + '? rel = 0 & amp; autoplay = 1',
'width': 640,
'height': 480,
helpers: {
overlay: {
locked: false
},
title: {
type: 'inside' // to append the html
}
}
});
});
Answer 1, authority 100%
For the video to work correctly, you need to add helper - media
, I have it connected like this:
$ ('. link'). fancybox ({
openEffect: 'none',
closeEffect: 'none',
helpers: {
media: {}
}
});
And in html this is the code:
& lt; a class = "link" href = "http://www.youtube.com/watch?v = video code "data-rel =" media "& gt;
Watch the video
& lt; / a & gt;