Skip to content

SmileWanted: Use bid.mtype to set the bid type, add audio and native support - #4699

Open
JFSmile wants to merge 3 commits into
prebid:masterfrom
SmileWanted:smilewanted-bid-mtype
Open

JFSmile wants to merge 3 commits into
prebid:masterfrom
SmileWanted:smilewanted-bid-mtype

Conversation

@JFSmile

@JFSmile JFSmile commented Nov 4, 2026 •

Copy link
Copy Markdown

🔧 Type of changes

  • bid adapter update

✨ What's the context?

The SmileWanted endpoint returns bid.mtype on its bids. The adapter now uses it to set the bid type, and supports audio and native.

🧠 Rationale behind the change

  • bid.mtype sets the bid type when present: 1 banner, 2 video, 3 audio, 4 native.
  • Without mtype, the markup decides among the media types the impression offers: VAST is video or audio, a JSON object is native, anything else is banner. An impression without banner keeps its own media type.
  • Audio and native are declared for app and site.

🧪 Test plan

  • Unit tests for a banner + video impression with mtype 1 and with mtype 2.
  • Unit tests without mtype on banner + video, banner + audio and banner + native impressions, with HTML markup and with VAST or native JSON markup.
  • Unit tests for audio and native bids, with and without mtype.
  • SmileWantedBidderTest passes with 100% line and branch coverage of SmileWantedBidder, checkstyle clean.

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

- Read bid.mtype (1 banner, 2 video) when it is set.
- Fall back to the impression when mtype is absent.
- Add tests for a banner + video impression with mtype 1, mtype 2 and
  without mtype.
- Declare audio and native media types for app and site.
- Map bid.mtype 3 to audio and 4 to native.
- Without mtype, fall back to the impression: video, then audio, then
  native, otherwise banner.
- Add tests for audio and native bids, with and without mtype.
- Without mtype, on an impression that offers banner and another media
  type, read the markup: VAST is video or audio, a JSON object is
  native, anything else is banner.
- An impression without banner keeps its own media type.
- Add tests without mtype for banner + video, audio and native
  impressions, with each kind of markup.
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.

1 participant