From 5c1b52cc918bc909a8bca03f4a2b9665b52bdf71 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Wed, 3 May 2023 11:45:58 +0800 Subject: [PATCH] Fix bug. --- assets/stylesheets/template/modules/announcement.scss | 1 - modules/ad_banner/_ad_banner_widget2_video.html.erb | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/stylesheets/template/modules/announcement.scss b/assets/stylesheets/template/modules/announcement.scss index e119bae..309f072 100644 --- a/assets/stylesheets/template/modules/announcement.scss +++ b/assets/stylesheets/template/modules/announcement.scss @@ -222,7 +222,6 @@ width: 100% !important; height: 100%!important; margin: 0 !important; - max-width: fit-content; } } .w-annc__item{ diff --git a/modules/ad_banner/_ad_banner_widget2_video.html.erb b/modules/ad_banner/_ad_banner_widget2_video.html.erb index 5d45b10..af10773 100644 --- a/modules/ad_banner/_ad_banner_widget2_video.html.erb +++ b/modules/ad_banner/_ad_banner_widget2_video.html.erb @@ -327,6 +327,9 @@ event_dict[count_key] = event_dict[array_key].length; yt_player.addEventListener('onStateChange',onPlayerStateChange); banner_wrap.trigger('resize'); + if(i == 0 && $iframe.parents(".youtube_slide[data-autoplay=\"1\"]").length != 0){ + yt_player.mute().playVideo(); + } }else{ console.log("YT player changes its variables!") }