diff --git a/app/views/admin/ad_images/_jplayer.html.erb b/app/views/admin/ad_images/_jplayer.html.erb index 6b07180..05bf503 100644 --- a/app/views/admin/ad_images/_jplayer.html.erb +++ b/app/views/admin/ad_images/_jplayer.html.erb @@ -43,6 +43,10 @@ .jp-jplayer{ width: 100%; position: absolute; + overflow: hidden; + clip-path: 0 0; + box-sizing: content-box; + transform: translatez(0); } .jp-type-single{ position: relative; @@ -53,7 +57,17 @@ height: 100%; } [id^="jp_video_"]{ - height: 100%; + box-sizing: content-box; + position: absolute; + top: -100%; + bottom: -100%; + left: -100%; + right: -100%; + margin: auto; + min-width: 100%; + min-height: 100%; + transform: translatez(0); + width: auto !important; } .jp-video.hide-ui .jp-jplayer,.jp-video.hide-ui .jp-video-play{ padding-bottom: 0em; @@ -180,11 +194,16 @@ <% end %> } function jplayer_center_video_front(ele){ + /* $(ele).css('margin-left',-Math.abs($(ele).parent().width()-$(ele).width())/2); if($(ele).parents('.w-ba-banner').length>0){ - $(ele).css('margin-top',-Math.abs($(ele).parents('.w-ba-banner').eq(-1).height()-$(ele).height())/2); + var p_h = $(ele).parents('.w-ba-banner').eq(-1).height(); + var h = ele.videoHeight || $(ele).height(); + $(ele).height() + $(ele).css('margin-top',-Math.abs(p_h-h)/2); } $(ele).css('transform','unset'); + */ } $(window).resize(function() { $('.w-ba-banner video[id^=jp_video_]').each(function(){