Hello,
If you need mute parameter to enable auto play then PRO version can automatically does it for auto-played YouTube videos.
The following code can be used for free version to add "mute=1" parameter for all YouTube videos. Add this to "ARI Fancy Lightbox -> Settings -> Advanced -> Custom JS code" parameter:
Code: |
var youtubeMatcher = $.fancybox.defaults.media.youtube.matcher;
$('A').each(function() {
var $a = $(this);
var href = $a.attr('href');
if (!href || !youtubeMatcher.test(href)) {
return;
}
var url = new URL(href);
url.searchParams.set('mute', '1');
$a.attr('href', url.toString());
});
|
Regards,
ARI Soft