Skip to content

Commit 0d9e57c

Browse files
committed
Allow feature switch to also control the loop video CORS mechanism
1 parent 75addc2 commit 0d9e57c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

dotcom-rendering/src/layouts/FrontLayout.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,13 @@ export const FrontLayout = ({ front, NAV }: Props) => {
198198
};
199199

200200
/** We allow the video to set crossOrigin={"anonymous"} if:
201-
*- the user is opted into the 0% server side test
201+
* - the feature switch is ON
202+
* OR
203+
* - the user is opted into the 0% server side test
202204
*/
203-
const enableLoopVideoCORS = abTests.loopVideoLoadVariant === 'variant';
205+
const enableLoopVideoCORS =
206+
!!front.config.switches.enableLoopVideoCors ||
207+
abTests.loopVideoLoadVariant === 'variant';
204208

205209
return (
206210
<>

0 commit comments

Comments
 (0)