Skip to content

Commit fdcee45

Browse files
authored
Merge pull request #1331 from prezly/feature/videos-tracking
[DEV-20640] Do not require consent if video served from Prezly CDN
2 parents acfe1e6 + f0873c7 commit fdcee45

File tree

1 file changed

+6
-1
lines changed
  • src/components/ContentRenderer/components

1 file changed

+6
-1
lines changed

src/components/ContentRenderer/components/Video.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ export function Video({ node }: Props) {
2929
}
3030
}, []);
3131

32-
if (!canUseThirdPartyCookie) {
32+
if (!canUseThirdPartyCookie && !isPrezlyUrl(node.url)) {
3333
return <NoConsentFallback id={`video-${node.uuid}`} entity="video" oembed={node.oembed} />;
3434
}
3535

3636
return <Elements.Video node={node} onPlay={handlePlay} />;
3737
}
38+
39+
function isPrezlyUrl(url: string) {
40+
const { hostname } = new URL(url);
41+
return hostname.endsWith('.prezly.com');
42+
}

0 commit comments

Comments
 (0)