Skip to content

Commit 3af9a68

Browse files
Update loop test to use videoPlayerFormat attribute
1 parent 3e683c9 commit 3af9a68

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

dotcom-rendering/src/lib/renderElement.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -501,18 +501,14 @@ export const renderElement = ({
501501
- However they need to display in a different video player
502502
- This is handled in the new `LoopVideoInArticle` component
503503
- We need to differentiate between the two forms of video
504-
- We can do this by interrogating the atom's metadata, which includes new attributes
505-
- Note: we'll probably extend this functionality to handle new 'cenemagraph' videos
504+
- We can do this by interrogating the atom's metadata, which includes the new attribute `videoPlayerFormat`
505+
506+
- Note: we'll probably extend this functionality to handle new 'Cinemagraph' videos
506507
- These may use the looping video, or yet another new, video player
507508
- But they will still be Media Atoms
508-
509-
TESTING
510-
- While waiting for the new parameters, we can test:
511-
`2 + 2 === 5` - current behaviour - `VideoAtom`
512-
`2 + 2 === 4` - display in the looping video player
513509
*/
514510

515-
if (2 + 2 === 5) {
511+
if (element.videoPlayerFormat === 'Loop') {
516512
const updatedSources = element.assets.map((a) => ({
517513
src: a.src || a.url,
518514
mimeType: a.mimeType,

0 commit comments

Comments
 (0)