Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creative Example: simid_player.js file: createSimidIframe_() - creating the iframe in a different element seems to enable intended functionality #309

Open
ftslo opened this issue Nov 25, 2019 · 0 comments
Assignees

Comments

@ftslo
Copy link
Collaborator

ftslo commented Nov 25, 2019

I assume the intended functionality of the creative example is to enable the user to toggle between the overlay and survey ad types, then click 'initialize the creative' and 'Start ad playback' to switch between SIMID creatives. If this is the case, it think modifying the line of code below may enable this functionality.. I'm not certain if this is the correct place to make this change, but I thought I'd mention it here.

createSimidIframe_() {
   // const playerDiv = document.getElementById('ad_video_div');    // This element seems to be where the frame should go; Putting it here also allows you to toggle between 'overlay' and 'survey' ad types then initiating and starting the ad without having to reload the page.

   const playerDiv = document.getElementById('player_div');  // current element
   const simidIframe = document.createElement('iframe');
   simidIframe.style.display = 'none';
   // The target of the player to send messages to is the newly
   // created iframe.
   playerDiv.appendChild(simidIframe);
   // Set up css to overlay the SIMID iframe over the video creative.
   simidIframe.classList.add('simid_creative');
   // Set the iframe creative, this should be an html creative.
...
   return simidIframe;
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants