Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

YouTube, ARI and sound muted.
(1 viewing) (1) Guest
"ARI Fancy Lightbox" WordPress plugin
Go to bottomPage: 1
TOPIC: YouTube, ARI and sound muted.
#71182
YouTube, ARI and sound muted. 10 Months, 3 Weeks ago Karma: 0
I was wondering if the plugin can be updated to include this code (&mute =0) at the end if every video link? Have it like a check box where people either can select to have it on or off.
The administrator has disabled public write access.
 
#71183
Re:YouTube, ARI and sound muted. 10 Months, 3 Weeks ago Karma: 748
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
The administrator has disabled public write access.
 
Go to topPage: 1