From 17a48a3b1ae26f185d817c2ff65ac57be3c4210a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Sun, 14 Nov 2021 15:09:37 +0800 Subject: [PATCH] add audio control feature for youtube --- modules/ad_banner/_ad_banner_widget2_video.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ad_banner/_ad_banner_widget2_video.html.erb b/modules/ad_banner/_ad_banner_widget2_video.html.erb index 8d3b0e6..49fa737 100644 --- a/modules/ad_banner/_ad_banner_widget2_video.html.erb +++ b/modules/ad_banner/_ad_banner_widget2_video.html.erb @@ -60,7 +60,7 @@ if ($video.length>0){ $(ele).jPlayer("mute", !$(ele).data().jPlayer.options.muted); }else{//youtube - console.log('control youtube audio'); + $(ele).find('iframe').data("yt_player").unmute(); } }) $(ele).append(audio_div);