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

Fallback for renderer #1924

Closed
YOzaz opened this issue Dec 6, 2017 · 4 comments
Closed

Fallback for renderer #1924

YOzaz opened this issue Dec 6, 2017 · 4 comments

Comments

@YOzaz
Copy link

YOzaz commented Dec 6, 2017

Type of issue

Question

Description

Working with Outstream video ads. Let's say, we have a config like this:

var videoAdUnits = [
  {
    code: 'video1',
    sizes: [ 640, 480 ],
    mediaTypes: {
      video: {
        context: 'outstream'
      }
    },
    bids: [
      {
        bidder: 'unruly',
        params: {
          siteId: 1080876
        }
      }, {
        bidder: 'spotx',
        params: {
          channel_id: 162721
        }
      }
    ]
  }
];

Unruly bidder returns renderer as a part of their response, while SpotX - doesn't.
How we can assign custom renderer for SpotX bidder only? At the moment, anything what's specified on adUnit level overwrites any renderer response from bids.
Asking, because SpotX has EASI Player for playback, Rubicon has their own player, etc.
video.js does not "expand" automatically in the content, and doesn't support auto-play on mobile (transcoding).

Platform details

v0.34.0

Other information

http://prebid.org/dev-docs/show-outstream-video-ads.html

@mkendall07
Copy link
Member

@YOzaz
Thanks for the feedback. This feature isn't supported yet but would like your feedback on how you would expect it to work. Thanks

@YOzaz
Copy link
Author

YOzaz commented Dec 15, 2017

@mkendall07 thanks for your response!

Looking at Prebid.js source code - if I understand that correctly - publisher can overwrite renderer by it's own player - even if renderer is returned by bidder itself: https://github.com/prebid/Prebid.js/blob/master/src/auction.js#L293. However, it's either full overwrite or rely on bidder's adapter.

To solve my question/issue, there are 2 options basically:

  • Introduce configuration on ad unit level, which bidders publisher's renderer is bound to; this can be achieved by adding bidders array to renderer property: http://prebid.org/dev-docs/show-outstream-video-ads.html#renderers, and converting whole property to array (as optional), same way userSync config is defined. So it would be:
pbjs.addAdUnit({
    code: 'video1',
    sizes: [640, 480],
    mediaTypes: {
      video: {
        context: 'outstream'
      }
    },
    renderer: [{	// can be "renderers"?
        url: '...',
        render: function(bid) { /* ... */ },
        bidders: ['appnexus','rubicon']
    }, {
        url: '...',
        render: function(bid) { /* ... */ },
        bidders: ['spotx']
    }, {
        url: '...',
        render: function(bid) { /* ... */ }	// default fallback
    }],
    ...
});
pbjs.bidderSettings = {
    standard: {
        renderer: {		// default optional fallback
            url: '...',
            render: function(bid) { /* ... */ }
        }
    },
    rubicon: {
        renderer: {
            url: '...',
            render: function(bid) { /* ... */ }
        }
    }
}

Then you'd just need to query renderers array and filtering it out by bidder code, or query from bidder settings, in auction.js where renderer is assigned.

Validation function may need updating as well: https://github.com/prebid/Prebid.js/blob/master/src/video.js#L56.

Unfortunately, I don't feel I know prebid.js source code good enough to submit a PR, but from my understanding - it should be quite easy change and introduce lots of flexibility.

@stale
Copy link

stale bot commented Mar 6, 2018

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.

@stale stale bot added the wontfix label Mar 6, 2018
@stale stale bot closed this as completed Mar 13, 2018
@jonasju
Copy link

jonasju commented Dec 6, 2018

Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants