Skip to content

WS-2638 - MAP Promo Playback on Homepage and Topics [SPIKE]#14087

Draft
pvaliani wants to merge 8 commits into
latestfrom
WS-2638-insitu-playback-spike
Draft

WS-2638 - MAP Promo Playback on Homepage and Topics [SPIKE]#14087
pvaliani wants to merge 8 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

  • Enables MAP videos to be played when they are the first/leading promo in the HierarchicalGrid when used on Home or Topic Pages
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
promo,
promoIndex,
mediaBlocks,
}: Props): InSituPlaybackEligibility => {

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.

So is this a blanket rule for every hieirachicalGrid view the first promo will show as in-situ playback.

It's not just if its the first curation on the page?

(would be uncomfortable with the latter as it starts to make the rendering very unpredictable)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah no worries. The intention is that the first promo in every Hierarchical Grid can support in-situ playback when eligible, rather than only the first curation on the page. We can make this clearer in the implementation

Comment on lines +98 to +107
const inSituPlaybackEligibility = getInSituPlaybackEligibility({
promo,
promoIndex: i,
mediaBlocks: promo.inSituMedia,
});
const eligibleInSituMediaBlocks =
!isAmp && inSituPlaybackEligibility.isEligible
? inSituPlaybackEligibility.mediaBlocks
: null;
const inSituMediaBlocks = eligibleInSituMediaBlocks;

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.

From a maintainability standpoint this logic definitely belongs in the BFF as it is pure business logic

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Based on Option B from the spike we can move the eligibility checks into the BFF so Simorgh does not decide whether a promo qualifies. Simorgh would only render the in-situ player when the BFF provides the required media data. This was linked to performance concerns in Option A

VISUAL_PROMINENCE,
VISUAL_STYLE,
} from '#app/models/types/curationData';
import getPageData from '../pageRequests/getPageData';

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.

I think there is a lot of logic that belongs in the BFF in this file, I'd try and only send to the frontend what is need to render nothing more

@pvaliani

Copy link
Copy Markdown
Contributor Author

Thanks for the spike feedback @andrewscfc!

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