You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 3.21 and the change on Renderer.js, if you need a specific renderer for outstream video bids, this Renderer is actually called a bit later than before and the global variable might not be set at the time of the render function.
I did a workaround wit an eventListener on the adUnit and a dispatch at the end of my Renderer. renderer: { url: 'renderer.js', render: function (bid) { window.addEventListener('dtkRendererReady', function (event) { DtkRenderer.renderVideoAd(bid); }) } }
import DtkRenderer from './library/dtkrenderer/DtkRenderer'; window.DtkRenderer = DtkRenderer; const evt = new Event('dtkRendererReady'); window.dispatchEvent(evt);
What would you do in my shoes ?
The text was updated successfully, but these errors were encountered:
My understanding is that there's never been a guarantee that the renderer url is loaded before the render function is called. So I don't know if I'd call this a bug, in sense in operates as it always has and how the original developer intended. It's more of a sub-optimal design choice about how have always renderers work.
I think of the AppNexus bidder and the reference implementation for how to implement an outstream renderer (since the Prebid core support for outstream was likely implemented done by the same engineer (or at least in close coordination with) who implemented the bidder piece. The AppNexus bidder uses queue to handle the issue:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Type of issue
BUG
Description
Since 3.21 and the change on Renderer.js, if you need a specific renderer for outstream video bids, this Renderer is actually called a bit later than before and the global variable might not be set at the time of the render function.
I did a workaround wit an eventListener on the adUnit and a dispatch at the end of my Renderer.
renderer: { url: 'renderer.js', render: function (bid) { window.addEventListener('dtkRendererReady', function (event) { DtkRenderer.renderVideoAd(bid); }) } }
import DtkRenderer from './library/dtkrenderer/DtkRenderer'; window.DtkRenderer = DtkRenderer; const evt = new Event('dtkRendererReady'); window.dispatchEvent(evt);
What would you do in my shoes ?
The text was updated successfully, but these errors were encountered: