<script src="https://imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
<script>
!function(){var d=document,w=d.createElement("div");w.id="gam-outstream",w.style="position:relative;max-width:100%;margin:20px auto;",d.body.appendChild(w);var v=d.createElement("video");v.id="gam-outstream-video",v.style="width:100%;height:auto;",v.muted=!0,v.playsInline=!0,w.appendChild(v);var b=d.createElement("button");b.id="gam-outstream-close",b.innerHTML="✕",b.style="display:none;position:absolute;top:5px;right:5px;z-index:9999;background:rgba(0,0,0,0.5);color:#fff;border:none;border-radius:50%;width:24px;height:24px;cursor:pointer;",w.appendChild(b);var s=!1,a;function f(){var W=Math.min(window.innerWidth,320);w.style.position="fixed",w.style.bottom="10px",w.style.right="10px",w.style.width=W+"px",w.style.height=(W*9/16)+"px",w.style.zIndex="9999",s=!0}function r(){w.style.position="relative",w.style.width="100%",w.style.height="auto",w.style.zIndex="1",s=!1}function c(){w.style.display="none",w.remove(),window.removeEventListener("scroll",i),window.removeEventListener("resize",u)}function i(){var e=w.getBoundingClientRect();s||e.bottom<0?f():s&&e.top>=0&&r()}function u(){s&&f()}window.addEventListener("scroll",i),window.addEventListener("resize",u),b.addEventListener("click",c);var adc=new google.ima.AdDisplayContainer(w,v);adc.initialize();var al=new google.ima.AdsLoader(adc);al.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(e){a=e.getAdsManager(v);try{a.init(w.offsetWidth,360,google.ima.ViewMode.NORMAL),a.start(),b.style.display="block",a.addEventListener(google.ima.AdEvent.Type.COMPLETE,r),a.addEventListener(google.ima.AdEvent.Type.SKIPPED,c)}catch(t){console.log(t)}},!1),al.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){console.log(e.getError()),c()},!1);var ar=new google.ima.AdsRequest;ar.adTagUrl="https://pubads.g.doubleclick.net/gampad/ads?iu=/21796171171/Outstream&description_url=[placeholder]&tfcd=0&npa=0&sz=1x1&cust_params=page_url%3Dpage_url&gdfp_req=1&unviewed_position_start=1&correlator="+Date.now()+"&vpos=preroll&output=vast&env=vp&vpmute=0&vpa=click",ar.linearAdSlotWidth=w.offsetWidth,ar.linearAdSlotHeight=360,ar.nonLinearAdSlotWidth=w.offsetWidth,ar.nonLinearAdSlotHeight=150,al.requestAds(ar)}();
</script>
23
9
461KB
1459KB
303.0ms
892.0ms
569.0ms