Search the Community
Showing results for tags 'ytplayer'.
-
Obviously I control nothing that DCM uses to insert banner ads, and yes I am bending the DCM vs DCRM rules (video equals Rich Media). The horizontal scroll is really wide, the vertical about 10 pixels. That being said does anyone see anything that jumps out at them. <style type="text/css" style="display: none !important;"> * { margin: 0; padding: 0; } body { overflow-x: hidden; } #wrapper{ position: relative; width: 300px; height:250px; z-index: 1; } #player { top:55px; left:8px; width: 280px; position: absolute; } </style> <script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script> <script src="mealKit_300x250_youtube_noZindex_TS.js?1493820012728"></script> <script> var canvas, stage, exportRoot; function init() { // --- write your JS code here --- canvas = document.getElementById("canvas"); exportRoot = new lib.mealKit_300x250_youtube_noZindex_TS(); stage = new createjs.Stage(canvas); stage.addChild(exportRoot); stage.enableMouseOver(); createjs.Ticker.setFPS(lib.properties.fps); createjs.Ticker.addEventListener("tick", stage); } </script> <!-- write your code here --> <script type="text/javascript">var clickTag = "https://www.google.com";</script> </head> <body onload="init();" style="background-color:#D4D4D4;margin:0px;"> <div id="wrapper"> <div id="player"></div> <canvas id="canvas" width="600" height="500" style="background-color:rgba(205, 152, 101, 1.00); width:300px; height:250px" onclick="javascript:window.open(window.clickTag)"></canvas> </div> <script> // 2. This code loads the IFrame Player API code asynchronously. var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // 3. This function creates an <iframe> (and YouTube player) // after the API code downloads. var player; function onYouTubeIframeAPIReady() { player = new YT.Player('player', { height: '154', width: '250', videoId: 'XAtmYu0bbKo', playerVars: { 'autoplay': 1, 'modestbranding':1, 'controls': 1, 'fs': 0, 'rel': 0 }, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); } var playerReady = false; // 4. The API will call this function when the video player is ready. function onPlayerReady(event) { playerReady = true; player.mute(); } // 5. The API calls this function when the player's state changes. // The function indicates that when playing a video (state=1), // the player should play for six seconds and then stop. function onPlayerStateChange(event) { if (event.data == YT.PlayerState.ENDED) { <!-- alert('done'); --> } } </script>