Skip to content

Commit 471eb55

Browse files
committed
append a ?cors=enabled query param to the end of loop video sources so that they are requested fresh instead of from cache.
1 parent 9d9cb06 commit 471eb55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dotcom-rendering/src/components/LoopVideoPlayer.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ export const LoopVideoPlayer = forwardRef(
181181
<source
182182
key={source.mimeType}
183183
/* The start time is set to 1ms so that Safari will autoplay the video */
184-
src={`${source.src}#t=0.001`}
184+
src={
185+
enableLoopVideoCORS
186+
? `${source.src}#t=0.001?cors=enabled`
187+
: `${source.src}#t=0.001`
188+
}
185189
type={source.mimeType}
186190
/>
187191
))}

0 commit comments

Comments
 (0)