@@ -29,6 +29,7 @@ import { Island } from '../components/Island';
2929import { ItemLinkBlockElement } from '../components/ItemLinkBlockElement' ;
3030import { KeyTakeaways } from '../components/KeyTakeaways' ;
3131import { KnowledgeQuizAtom } from '../components/KnowledgeQuizAtom.importable' ;
32+ import { LoopVideoInArticle } from '../components/LoopVideoInArticle' ;
3233import { MainMediaEmbedBlockComponent } from '../components/MainMediaEmbedBlockComponent' ;
3334import { MapEmbedBlockComponent } from '../components/MapEmbedBlockComponent.importable' ;
3435import { MiniProfiles } from '../components/MiniProfiles' ;
@@ -490,15 +491,35 @@ export const renderElement = ({
490491 </ Island >
491492 ) ;
492493 case 'model.dotcomrendering.pageElements.MediaAtomBlockElement' :
493- return (
494- < VideoAtom
495- format = { format }
496- assets = { element . assets }
497- poster = { element . posterImage ?. [ 0 ] ?. url }
498- caption = { element . title }
499- isMainMedia = { isMainMedia }
500- />
501- ) ;
494+ /*
495+ - MediaAtomBlockElement is used for self-hosted videos
496+ - Historically, these videos have been self-hosted for legal or sensitive reasons
497+ - These videos play in the `VideoAtom` component
498+ - Looping videos, introduced in July 2025, are also self-hosted
499+ - Thus they are delivered as a MediaAtomBlockElement
500+ - However they need to display in a different video player
501+ - We need to differentiate between the two forms of video
502+ - We can do this by interrogating the atom's metadata, which includes the new attribute `videoPlayerFormat`
503+ */
504+ if ( element . videoPlayerFormat === 'Loop' ) {
505+ return (
506+ < LoopVideoInArticle
507+ element = { element }
508+ format = { format }
509+ isMainMedia = { isMainMedia }
510+ />
511+ ) ;
512+ } else {
513+ return (
514+ < VideoAtom
515+ format = { format }
516+ assets = { element . assets }
517+ poster = { element . posterImage ?. [ 0 ] ?. url }
518+ caption = { element . title }
519+ isMainMedia = { isMainMedia }
520+ />
521+ ) ;
522+ }
502523 case 'model.dotcomrendering.pageElements.MiniProfilesBlockElement' :
503524 return (
504525 < MiniProfiles
0 commit comments