Skip to content

feat(mul): add video, multiformat, FPD, and schain support - #15900

Open
pranavdhawan wants to merge 2 commits into
prebid:masterfrom
pranavdhawan:feat/mul-video-support
Open

pranavdhawan wants to merge 2 commits into
prebid:masterfrom
pranavdhawan:feat/mul-video-support

Conversation

@pranavdhawan

Copy link
Copy Markdown
Contributor

Type of change

  • Feature
  • Updated bidder adapter
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

Description of change

Enhance the MonetiseUp (mul) bidder adapter to support:

  • Video Media Type: Added VIDEO support with full parameter extraction (playerSize, context, mimes, protocols, minduration, maxduration, playbackmethod, api, startdelay, skip, etc.).
  • Video Response Handling: Interprets vastUrl and vastXml payloads alongside banner HTML.
  • Multi-Format Support: Handles hybrid ad units bidding on both banner and video (will-bid-on-any).
  • First Party Data (FPD): Passes ortb2.site, ortb2.device, eids, schain, and ortb2Imp.ext.gpid.
  • Floor Pricing: Upgraded getFloor logic to query floors across banner and video formats.

Unit tests added covering video serialization, vast responses, FPD, and multi-format requests. All 13 unit tests pass and linting is clean.

Test parameters:

{
  bidder: 'mul',
  params: {
    placementId: 'test-placement-123'
  }
}

Copilot AI balanced review requested due to automatic review settings October 29, 2026 06:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T07:02:35.529130Z 98ea59b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98ea59bb96

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread modules/mulBidAdapter.ts
let floor = 0;
let floorCurrency = 'USD';
if (typeof bid.getFloor === 'function') {
const queryMediaType = videoMedia && !bannerMedia ? VIDEO : (bannerMedia ? BANNER : '*');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve per-format floors on hybrid bids

🤖 This comment was written by an AI agent (GPT-5.6 Sol) on behalf of the requester.

When one bid contains both banner and video and the publisher defines different floor rules, this ternary always calls getFloor with banner because bannerMedia exists. The single result is then applied to both formats, so a higher banner floor suppresses video bids that meet their own floor, while a lower banner floor causes video responses below the publisher's video floor to be requested and later rejected by the floors hook. Query and represent each format's floor rather than preferentially applying banner.

AGENTS.md reference: AGENTS.md:L115-L115

Useful? React with 👍 / 👎.

Comment thread modules/mulBidAdapter.ts
skipafter: videoMedia.skipafter,
placement: videoMedia.placement,
plcmt: videoMedia.plcmt,
linearity: videoMedia.linearity

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve all validated OpenRTB video fields

🤖 This comment was written by an AI agent (GPT-5.6 Sol) on behalf of the requester.

When a newly supported video ad unit supplies core-valid fields such as battr, pos, minbitrate, or maxbitrate, this hand-built object stops at linearity and silently drops them before MonetiseUp sees the request. Blocked creative attributes, placement, and bitrate limits can therefore be ignored; populate the object from the validated properties exposed by ORTB_VIDEO_PARAMS (plus the custom context/player-size fields) rather than maintaining this partial list.

AGENTS.md reference: AGENTS.md:L92-L96

Useful? React with 👍 / 👎.

Comment thread modules/mulBidAdapter.ts
Comment on lines +91 to +92
if (bid.ortb2Imp?.ext?.gpid) {
bidItem.gpid = bid.ortb2Imp.ext.gpid;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Forward the interstitial FPD flag

🤖 This comment was written by an AI agent (GPT-5.6 Sol) on behalf of the requester.

When a publisher sets bid.ortb2Imp.instl = 1, this new impression-level FPD handling copies only ext.gpid, so the endpoint receives no interstitial flag. MonetiseUp can consequently classify fullscreen/interstitial inventory as an ordinary banner or video placement and return unsuitable demand; forward ortb2Imp.instl on the corresponding bid item.

AGENTS.md reference: AGENTS.md:L101-L101

Useful? React with 👍 / 👎.

Comment thread modules/mulBidAdapter.ts
});
};

if (isVideo) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Attach a renderer for advertised outstream bids

🤖 This comment was written by an AI agent (GPT-5.6 Sol) on behalf of the requester.

For an ad unit with context: 'outstream' that does not supply its own renderer or useCacheKey, this branch adds only VAST fields and never a renderer. checkVideoBidSetup in src/video.ts rejects exactly that case, so MonetiseUp outstream responses are discarded even though the adapter now advertises outstream support; attach a renderer or explicitly document and enforce the publisher-renderer requirement.

Useful? React with 👍 / 👎.

@barecheck

barecheck Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Barecheck - Code coverage report

Total: 91.75%

Your code coverage diff: 0.01% ▴

Uncovered files and lines
FileLines
modules/mulBidAdapter.ts162, 168, 171, 240

@github-actions

Copy link
Copy Markdown

This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:

  • Changes to modules/mulBidAdapter.ts may need:
    • es.iterator.find
    • esnext.iterator.find

The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers.

@pranavdhawan

Copy link
Copy Markdown
Contributor Author

Addressed both review suggestions:

  1. bid.ortb2Imp.instl is now forwarded in buildRequests.
  2. Enforced publisher-renderer requirement in isBidRequestValid for outstream video when neither a renderer nor useCacheKey is provided, and documented the requirement in the module md and docs page.
  3. Added unit tests for both cases (all 17 tests passing).

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.

2 participants