This commit is contained in:
BoHung Chiu 2022-06-26 22:24:44 +08:00
parent a7a8935946
commit 92f3ffe183
2 changed files with 5 additions and 2 deletions

View File

@ -58,7 +58,8 @@ class AdBannersController < ApplicationController
"banner-width" => adbanner.width,
"base_image" => (base_image - 1),
"timeout" => (adbanner.timeout * 1000),
"more" => "More"
"more" => "More",
"desc" => ""
},
"images" => images
}
@ -149,11 +150,13 @@ class AdBannersController < ApplicationController
extra_before_html = ActionController::Base.helpers.stylesheet_link_tag("banner/jplayer.blue.monday.min.css")
extra_after_html = ActionController::Base.helpers.javascript_include_tag("banner/jquery.jplayer.min.js")
end
base_image = adbanner.base_image.nil? ? 1 : adbanner.base_image
{
"extras" => {
"ad_fx" => adbanner.ad_fx,
"speed" => adbanner.speed,
"title" => adbanner.title,
"base_image" => (base_image - 1),
"timeout" => (adbanner.timeout * 1000),
"more" => "More",
"desc" => adbanner.title,

View File

@ -235,7 +235,7 @@ if (typeof onYouTubeIframeAPIReady !== 'function'){
})
}
function onPlayerStateChange(event){
var iframe = $(event.target.h),
var iframe = $(event.target.getIframe()),
cyclediv = iframe.parents("div.cycle-slideshow");
var widget = cyclediv.parents('.ba-banner-widget-youtube');
if(event.data == YT.PlayerState.PLAYING || event.data == YT.PlayerState.BUFFERING){