Skip to content

Commit

Permalink
Publishing latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bretmcg committed Oct 6, 2014
1 parent d00c975 commit 37af383
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
12 changes: 9 additions & 3 deletions simple/ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ var adsManager;
var adsLoader;
var adDisplayContainer;
var intervalTimer;
var playButton;
var videoContent;

var videoContent = document.getElementById('contentElement');
function init() {
videoContent = document.getElementById('contentElement');
playButton = document.getElementById('playButton');
playButton.addEventListener('click', requestAds);
}

function createAdDisplayContainer() {
// We assume the adContainer is the DOM id of the element that will house
Expand Down Expand Up @@ -156,5 +162,5 @@ function onContentResumeRequested() {

}

//Kick off the ads request
requestAds();
// Wire UI element references and UI event listeners.
init();
3 changes: 2 additions & 1 deletion simple/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
</div>
<div id="adContainer"></div>
</div>
<script type="text/javascript" src="//s0.2mdn.net/instream/html5/ima3.js"></script>
<button id="playButton">Play</button>
<script type="text/javascript" src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
<script type="text/javascript" src="ads.js"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions simple/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,21 @@
width: 640px;
height: 360px;
}

#playButton {
margin-top:10px;
vertical-align: top;
width: 350px;
height: 60px;
padding: 0;
font-size: 22px;
color: white;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
background: #2c3e50;
border: 0;
border-bottom: 2px solid #22303f;
cursor: pointer;
-webkit-box-shadow: inset 0 -2px #22303f;
box-shadow: inset 0 -2px #22303f;
}

0 comments on commit 37af383

Please sign in to comment.