-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
src/adapters/appnexusAst.js
Outdated
// setup code for renderer, if any | ||
function onOutstreamRendererLoaded(bid) { | ||
// adload.loadScript has loaded ANOutstreamVideo | ||
bid.renderer.loaded = true; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
* Use Renderer command queue to render outstream * Abstract automatic processing in renderer
….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) ...
* Use Renderer command queue to render outstream * Abstract automatic processing in renderer
* Use Renderer command queue to render outstream * Abstract automatic processing in renderer
Type of change
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 torenderer.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.