Skip to content

feat: support instream video ad requests (Amazon TAM) - #17

Open
JeromeBonfort wants to merge 2 commits into
masterfrom
feature/instream-video-ad-type
Open

feat: support instream video ad requests (Amazon TAM)#17
JeromeBonfort wants to merge 2 commits into
masterfrom
feature/instream-video-ad-type

Conversation

@JeromeBonfort

Copy link
Copy Markdown
Contributor

Rescues work that only ever existed as a patch file in the app repo
(footmercatomobile2, branch feat/prebid-video-native-bridge, June 2026). It was never
opened here as a branch or a PR, so it was one branch deletion away from being lost.

What it adds

AdLoader.createVideoAdLoader({ slotUUID, playerWidth, playerHeight }) issues an instream
video bid request. Defaults to a 640x480 player, matching the web adManager player size.

The non-obvious part

Android is why the Java file gets a helper extracted. Banner and interstitial read their
targeting from getDefaultDisplayAdsRequestCustomParams(), a Map<String, List<String>>,
while instream video exposes a flat Map<String, String> through a different accessor.
Reading the display one for a video response silently drops every amzn* keyword.

Merge with #16

Both touch the loadAd call site. The callback now carries the video flag while keeping the
note explaining why options.contentUrl has no Android equivalent.

What was deliberately left out

Only src/, android/ and ios/ are carried over. The original patch also touched
lib/typescript, but lib/ is generated by bob at publish time and is not tracked here.
That also fixes a latent defect of the original patch: its lib/commonjs and lib/module
were never updated, leaving the API typed but absent at runtime for any consumer
resolving through main — invisible under Metro, broken elsewhere.

Checks

  • yarn test:jest — 41 tests green (5 new, the original patch had none)
  • yarn tsc:compile
  • yarn lint:js:check
  • Device validation before npm publish

Note

The slot UUID is still a placeholder on the app side: the app-video slot has to be created
on the Amazon portal first. This PR only makes the SDK path available.

No version bump here on purpose — master is already at 2.3.0 and unpublished (npm latest
is 2.2.1). Bump once, when the SDK upgrade and setExternalUserIds land too.

Rescues work that only ever existed as a patch file in the app repo
(footmercatomobile2, branch feat/prebid-video-native-bridge, June 2026). It was
never opened here as a branch or a PR, so it was one branch deletion away from
being lost.

AdLoader.createVideoAdLoader({ slotUUID, playerWidth, playerHeight }) issues an
instream video bid request. Defaults to a 640x480 player, matching the web
adManager player size.

The non-obvious part is Android, and it is why the Java file gets a helper
extracted: banner and interstitial read their targeting from
getDefaultDisplayAdsRequestCustomParams(), a Map<String, List<String>>, while
instream video exposes a flat Map<String, String> through a different accessor.
Reading the display one for a video response silently drops every amzn* keyword.

Merged on top of the contentUrl work from #16: both touch the loadAd call site,
so the callback now carries the video flag while keeping the note explaining why
options.contentUrl has no Android equivalent.

Only src/, android/ and ios/ are carried over. The original patch also touched
lib/typescript, but lib/ is generated by bob at publish time and is not tracked
here — which also fixes a latent defect of that patch, whose lib/commonjs and
lib/module were never updated, leaving the API typed but absent at runtime for
any consumer resolving through main.

Adds 5 tests, which the original patch had none of. 41 tests green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Same miss as on the SDK branch: I ran lint:js:check locally instead of lint:code,
which the CI uses and which chains the Java and Objective-C formatters. The braced
switch case carried over from the app patch is not the style google-java-format
wants.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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