function setupSinglePlayer(showAd){
if(showAd){
$('#titleScreen').append("<div id='vidDiv'></div>");
$("#vidDiv").load('advid.html',function(){
if(application==null){
application = new Application();
}else{
//I want to request new ads here
}
application.onClick_();//I do this to autoplay the ad. Is there a better way
});
return;
}else{
$('#vidDiv').remove();
}
//start the game here
. . .
}
<div id="container">
<center>
<label for="tag">Tag (<span id="sampleAdTag" class="urlLink">sample</span>): </label>
<input type="text" size="75" id="tagText" value='https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator='/>
</center>
<div id="videoplayer">
<video id="content">
<!-- <source src="http://rmcdn.2mdn.net/Demo/vast_inspector/android.mp4"></source>
<source src="http://rmcdn.2mdn.net/Demo/vast_inspector/android.webm"></source>-->
</video>
<div id="adcontainer">
</div>
<button id="playpause" title="Play/Pause">▶</button>
<button id="fullscreen" title="Full screen">[ ]</button>
</div>
<div id="customClick">
<div id="customClickTextWrapper">Click here for more info on your ad.</div>
</div>
<div id="console">
Welcome to IMA HTML5 SDK Demo!
</div>
</div>
if(adEvent.type == google.ima.AdEvent.Type.ALL_ADS_COMPLETED){
setupSinglePlayer(false);
}if (adsManager != null) {adsManager.destroy();adsManager = null;}adsLoader.contentComplete();var adsRequest = new google.ima.AdsRequest();adsRequest.adTagUrl = 'https://pubads.g.doubleclick.net/...';adsRequest.linearAdSlotWidth = 640;adsRequest.linearAdSlotHeight = 400;adsRequest.nonLinearAdSlotWidth = 640;adsRequest.nonLinearAdSlotHeight = 150;adsLoader.requestAds(adsRequest);adsManager.start();
--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ima-sdk/NoG0znMvXk4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+unsubscribe@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.