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

Use Renderer command queue to render outstream #1283

Merged
merged 2 commits into from
Jun 14, 2017

Conversation

matthewlane
Copy link
Collaborator

@matthewlane matthewlane commented Jun 9, 2017

Type of change

  • Feature

Description of change

This PR adds properties to the Renderer constructor that can be used to delay rendering until a renderer is loaded. appnexusAst then makes use of these capabilities to enable rendering outstream video without the need for an ad server.

A call to pbjs.renderAd with a winning outstream bid can potentially be invoked before the render function for this bid is in memory. In this case, the render function pushes to the render command queue, which then gets processed after the renderer is loaded. Calls to renderer.render(bid) after the renderer is loaded will skip the command queue and invoke the render function immediately.

As a result, outstream video rendering that is invoked with an ad server, and outstream video rendering that is invoked without an adserver, will both work.

@protonate protonate self-requested a review June 9, 2017 19:33
@protonate protonate self-assigned this Jun 9, 2017
@protonate protonate added this to the Prebid 0.25.0 milestone Jun 9, 2017
// setup code for renderer, if any
function onOutstreamRendererLoaded(bid) {
// adload.loadScript has loaded ANOutstreamVideo
bid.renderer.loaded = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do this automatically in the renderer? Not have the caller manage it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really everything in this method is common, so we can abstract it away and not need it to be defined in the adapter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a commit to do this. Bidders can override the callback by passing a function on the callback property given to Renderer.install. If that's unnecessary or other changes needed, will update

Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! One recommended change.

Copy link
Collaborator

@protonate protonate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@protonate protonate merged commit c8bbc23 into master Jun 14, 2017
@matthewlane matthewlane deleted the feature/outstream-without-adserver branch June 14, 2017 18:54
Yann-Pravo pushed a commit to Yann-Pravo/Prebid.js that referenced this pull request Jul 6, 2017
* Use Renderer command queue to render outstream

* Abstract automatic processing in renderer
vzhukovsky added a commit to aol/Prebid.js that referenced this pull request Sep 6, 2017
….24.0 to aolgithub-master

* commit '7a81386579a3c129617323ef32e1c8be0897c3c7': (31 commits)
  Added changelog entry.
  Added records in aolPartnersIds.json.
  Prebid 0.25.0 Release
  Added Unruly adapter (prebid#1264)
  Fixing Adyoulike adapter for Safari iOS7 (prebid#1296)
  hide overflow to prevent scrolling (prebid#1294)
  fix protocol detection in iframe (prebid#1293)
  Add eplanning adapter (prebid#1245)
  Use Renderer command queue to render outstream (prebid#1283)
  Generate no-bid response for ech bid request not matched by a bid (prebid#1216)
  New Cox adapter (prebid#1228)
  Carambola Adapter (prebid#1221)
  Pass through transactionId and set fd=1 (prebid#1259)
  Integration test page for adapters (prebid#1182)
  Getting DigiTrustID in GumGum adapter (prebid#1256)
  Trion adapter (prebid#1254)
  use request bidder code as default bidderCode for createBid (prebid#1235)
  Add drop pixels once feature to AOL Adapter (prebid#1224)
  Rubicon Adapter - Adding 320x150 (prebid#1279)
  Prevent 'about:' protocol in _publisherTagUrl (prebid#1170)
  ...
jbAdyoulike pushed a commit to jbAdyoulike/Prebid.js that referenced this pull request Sep 21, 2017
* Use Renderer command queue to render outstream

* Abstract automatic processing in renderer
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* Use Renderer command queue to render outstream

* Abstract automatic processing in renderer
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

Successfully merging this pull request may close these issues.

3 participants