-
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
allow publisher to define backup renderer #5638
Conversation
@mike-chowla I think this works, How does it look? |
I put in #5639 to delete the bad adapter test this failed on Safari 12 |
merge in master
When I have both an ad unit renderer and bidder supplied renderer, backupOnly isn't working for me because the renderer object renderer object that gets created off of the bid, doesn't get the backupOnly flag set and thus the ad unit renderer is always used: Line 516 in b26bfe3
|
I don't understand, the line of code you linked isn't
https://github.com/prebid/Prebid.js/blob/cee4900ea2651d432708f4072c06de8a43248359/src/auction.js#L516
which is the line from the PR
…On Mon, Aug 24, 2020 at 2:52 PM Mike Chowla ***@***.***> wrote:
When I have both an ad unit renderer and bidder supplied renderer, backupOnly isn't working for me because the renderer object renderer object that gets created off of the bid, doesn't get the backupOnly flag set and thus the ad unit renderer is always used:
https://github.com/prebid/Prebid.js/blob/b26bfe31485b12288eafc89639fe8e671c1ccf4e/src/auction.js#L516
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
The PR relies on renderer.adUnitCode being set to determine which renderer to use but that code which is outside the PR does not set that field when using bidder supplied renderer |
rebase to master
This is ready for another look @mike-chowla ; thanks! |
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.
LGTM
Fyi @jaiminpanchal27 ; this modifies logic you added in #3284 |
docs PR prebid/prebid.github.io#2290 |
closed docs pr and reopened as prebid/prebid.github.io#2303 |
Type of change
Description of change
Publishers will be able to set an ad unit renderer to be "backup only" like this
pbjs.addAdUnit({ code: 'video1', mediaTypes: { video: { context: 'outstream', playerSize: [640, 480] } }, renderer: { url: 'https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js', backupOnly: true, render: function (bid) { ANOutstreamVideo.renderAd({ targetId: bid.adUnitCode, adResponse: bid.adResponse, }); } }, ... });
Other information
Solves for #1924 , #2668, and #5375