diff --git a/app/controllers/ad_banners_controller.rb b/app/controllers/ad_banners_controller.rb index 968b742..837b45d 100644 --- a/app/controllers/ad_banners_controller.rb +++ b/app/controllers/ad_banners_controller.rb @@ -88,7 +88,7 @@ class AdBannersController < ApplicationController alt_title = (ad_b.title.blank? ? "ad-banner image" : ad_b.title) if ad_b.exchange_item == "1" image_html = "
#{ad_b.title}

#{context}

\" @@ -106,7 +106,7 @@ class AdBannersController < ApplicationController @file_poster = ad_b.video_snapshot.url rescue nil title = (ad_b.title.blank? ? File.basename(video_url) : ad_b.title) image_html = "
#{ad_b.title}

#{context}

\" @@ -122,7 +122,7 @@ class AdBannersController < ApplicationController image_html = "
#{ad_b.title}

#{context}

\" diff --git a/modules/ad_banner/_ad_banner_widget2_video.html.erb b/modules/ad_banner/_ad_banner_widget2_video.html.erb index 95637b5..2758af3 100644 --- a/modules/ad_banner/_ad_banner_widget2_video.html.erb +++ b/modules/ad_banner/_ad_banner_widget2_video.html.erb @@ -189,7 +189,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){ } function onYouTubeIframeAPIReady(){ $(".w-ba-banner").on('cycle-post-initialize', function(){ - init_banner(banner); + init_banner(this); }); function init_banner(banner){ var $banner = $(banner); @@ -251,6 +251,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){ event_dict[relation_key].onStateChange = []; event_dict[count_key] = event_dict[array_key].length; yt_player.addEventListener('onStateChange',onPlayerStateChange); + banner_wrap.trigger('resize'); }else{ console.log("YT player changes its variables!") }