Skip to content

WS-2638 - Enable in-situ video playback in Home and Topic Hierarchical Grid promos - #14087

Merged
pvaliani merged 28 commits into
latestfrom
WS-2638-insitu-playback-spike
Aug 21, 2026
Merged

WS-2638 - Enable in-situ video playback in Home and Topic Hierarchical Grid promos#14087
pvaliani merged 28 commits into
latestfrom
WS-2638-insitu-playback-spike

Conversation

@pvaliani

@pvaliani pvaliani commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Resolves JIRA:
https://bbc.atlassian.net/browse/WS-2638

Summary

  • Allows eligible MAP videos to play directly within the leading Hierarchical Grid promo slot on Home and Topic pages.
  • Uses inSituMedia supplied by the BFF to assist in rendering in-situ video
  • Renders a normal image promo when media is unavailable or the page is AMP
  • SMP receives the containing Home or Topic page identifier as its counter name, allowing reporting to distinguish in-situ playback from playback on the MAP article page
  • Adds unit tests for in-situ playback
Screen.Recording.2026-06-03.at.15.40.05.mov

EDIT:

Also checked on Home page (arabic):
image

Code changes

  • See files changed

Testing

Test link: http://localhost.bbc.com:7081/arabic/topics/cz9mm6r1q5et?renderer_env=live

Useful Links

@pvaliani pvaliani self-assigned this Jun 3, 2026
Comment thread src/app/components/Curation/HierarchicalGrid/index.tsx Outdated
Comment thread ws-nextjs-app/utilities/enrichCurationsWithInSituPlayback/index.ts Outdated
@pvaliani

Copy link
Copy Markdown
Contributor Author

Thanks for the spike feedback @andrewscfc!

@pvaliani pvaliani changed the title WS-2638 - MAP Promo Playback on Homepage and Topics [SPIKE] WS-2638 - Enable in-situ video playback in Home and Topic Hierarchical Grid promos Jul 24, 2026
@pvaliani
pvaliani marked this pull request as ready for review July 24, 2026 10:48
Copilot AI review requested due to automatic review settings July 28, 2026 07:37

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.

Pull request overview

Enables eligible MAP videos to play in-situ within the leading Hierarchical Grid promo on Home and Topic pages by consuming inSituMedia from the BFF, while falling back to the existing image promo on AMP or when media is unavailable.

Changes:

  • Add inSituMedia support to curation summary types and render MediaLoader in Hierarchical Grid when present (non-AMP).
  • Update MediaLoader analytics tests to ensure SMP uses the containing page’s identifier as counterName for in-situ playback contexts.
  • Add/extend unit tests and styling to cover the in-situ rendering and fallback behaviours.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/app/models/types/curationData.ts Extends Summary to include optional inSituMedia media blocks from the BFF.
src/app/components/MediaLoader/index.test.tsx Adds coverage to validate counterName uses the containing Home/Topic page identifier for in-situ blocks.
src/app/components/Curation/HierarchicalGrid/index.tsx Renders MediaLoader for promos with inSituMedia (non-AMP), otherwise falls back to existing image promo rendering.
src/app/components/Curation/HierarchicalGrid/index.test.tsx Adds tests for in-situ rendering, tracking, AMP fallback, and empty-media fallback.
src/app/components/Curation/HierarchicalGrid/index.styles.tsx Adds Emotion styles to support in-situ media layout and link overlay behaviour.

Comment thread src/app/components/Curation/HierarchicalGrid/index.test.tsx Outdated
Comment thread src/app/components/Curation/HierarchicalGrid/index.tsx

@LilyL0u LilyL0u 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.

Looking good.

Do you think that playing portrait videos from the portrait video carousel -> pop up modal also gives us a counter name of home page? If so, if a portrait video is in the in-situ spot, we might not be able to tell the difference between a carousel/modal play and the in-situ play? I don't think it matters though as it will be so rare.

@pvaliani

Copy link
Copy Markdown
Contributor Author

Looking good.

Do you think that playing portrait videos from the portrait video carousel -> pop up modal also gives us a counter name of home page? If so, if a portrait video is in the in-situ spot, we might not be able to tell the difference between a carousel/modal play and the in-situ play? I don't think it matters though as it will be so rare.

It's a good point and something that crossed my mind. The portrait video modal also uses the shared media player and inherits the Home page counter name. So the counter name tells us the video was played on Home, but not which component it was played from. If the same video appeared in both places, we couldn’t distinguish them using the counter name alone but as you say I think the chances of it happening are low and not very often. Product confirmed that page-level reporting is enough for now given the expected low volume. If that changes, we’d need a separate analytics marker for the player location. I will mention it to Product and see what thoughts are for this specific point!

@pvaliani
pvaliani merged commit 99220df into latest Aug 21, 2026
17 checks passed
@pvaliani
pvaliani deleted the WS-2638-insitu-playback-spike branch August 21, 2026 13:27
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.

6 participants