Skip to content

Instream/banner example: use a working JW Player library and a mocked video bid - #6996

Open
patmmccann wants to merge 1 commit into
prebid:masterfrom
patmmccann:agent-6904-instream-banner-mix
Open

patmmccann wants to merge 1 commit into
prebid:masterfrom
patmmccann:agent-6904-instream-banner-mix

Conversation

@patmmccann

@patmmccann patmmccann commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 This PR was written by an AI agent (Claude Code) on behalf of @patmmccann.

Closes #6904

The Instream Video and Banner example loaded https://content.jwplatform.com/libraries/72xIKEe6.js, which returns 403, so jwplayer was undefined and no video played. Its playlist feed (content.jwplatform.com/feeds/ae4tmw2D.json) returns 404, it relied on live msft test bids, and it pointed at the illustrative https://my-pbs.example.com/cache.

Player choice

I kept JW Player and switched to https://cdn.jwplayer.com/libraries/dNV4UKpE.js, the library the JW Player (Platform) instream example already uses. A headless run showed that example playing the mocked ad today. This doesn't need a new library URL from JW Player. It keeps the page's point (one Prebid config with banner ad units and an instream video ad unit) with the smallest change, and the page now matches the existing JW instream examples:

  • The content is https://vjs.zencdn.net/v/oceans.mp4, set with file, instead of the dead playlist.
  • The ad is passed as advertising.schedule[].vastxml.

I also checked Video.js 6.4.0 with videojs-vast-vpaid. Its scripts return 200, but it would mean rewriting the example around another player, and the JW route was the one I could confirm plays the ad.

Caching and bids

  • cache: { useLocal: true } replaces the illustrative Prebid Cache URL. The video VAST is fetched with pbjs.adServers.gam.getVastXml (GAM ad unit /41758329/localcache), the same way the other instream examples do it. buildVideoUrl can't return a playable tag for a locally cached bid.
  • The video request goes out from bidsBackHandler. GPT display still uses initAdserver with its failsafe.
  • The result tab uses _includes/video/mock-video-bid.html to simulate the video bid, as multi-format-example.md does. The code listing is unchanged.
  • The include takes a new optional adUnitCode parameter. This page passes adUnitCode="video1", so only the video ad unit's bids are mocked. Without it, the banner ad units would get video bids too. Pages that don't pass the parameter still mock every bid (when: {}), so nothing changes for them.

Other JW Player pages checked

None of them use the dead 72xIKEe6 library, so this PR leaves them unchanged:

Verification

  • The changed Markdown passes markdownlint-cli2@0.20.0 --config .markdownlint.json.
  • Jekyll isn't installed on this machine, so I rebuilt the result tab by hand: the two CMP-gated script includes, the rendered mock include, the page JS, then the page HTML. I served it locally and ran headless Chrome, loading the consent-gated scripts the way the CMP would. Results:
    • jwplayer is defined, and no page errors occurred.
    • There was exactly one bidResponse: video1, mediaType: video, cpm=1 with vastXml. The banner ad units weren't mocked and got no live bid.
    • getVastXml made the GAM request. JW Player reported buffering, then playing with the ad flag set, and requested the mock creative static.adplayer.pro/video/demo_v2.mp4.
  • I haven't checked the Netlify deploy preview yet. Its deploy is waiting for approval on Netlify. Once it's deployed, the same headless check can be run against /dev-docs/examples/instream-banner-mix.html.

🤖 Generated with Claude Code

… video bid

The example loaded content.jwplatform.com/libraries/72xIKEe6.js, which
now returns 403, so jwplayer was undefined and no video played. It also
relied on live test bids and an illustrative Prebid Cache URL.

- Load the JW Player library the JW Platform instream example uses
  (cdn.jwplayer.com/libraries/dNV4UKpE.js) and play oceans.mp4 instead
  of a playlist feed that now returns 404.
- Cache locally (cache.useLocal) and fetch the VAST with
  pbjs.adServers.gam.getVastXml, like the other instream examples.
- Simulate the video bid with _includes/video/mock-video-bid.html,
  which now takes an optional adUnitCode so banner bids aren't mocked.

Closes prebid#6904

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Nov 19, 2026

Copy link
Copy Markdown

👷 Deploy request for prebid-docs-preview pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 7673c29

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T14:51:16.187887Z 7673c29 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.

This branch has not been deployed

No deployments
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.

Instream video example: JW Player library URL returns 403

1 participant