Skip to content

🎥 Make videos programmatically with React

Hide code access warning for official Element installs

Igor Samokhovets4e69745f18e4
diff --git a/packages/studio/src/components/ElementInstallConfirmation.tsx b/packages/studio/src/components/ElementInstallConfirmation.tsx
index 1bef11349e..9c0e256b9d 100644
--- a/packages/studio/src/components/ElementInstallConfirmation.tsx
+++ b/packages/studio/src/components/ElementInstallConfirmation.tsx
@@ -321,6 +321,9 @@ export const ElementInstallConfirmation: React.FC<{
sourceIsUnverified,
sourceLabel,
} = state;
+ const isOfficialRemotionSource =
+ request.source.type === 'studio-protocol' &&
+ request.source.origin === 'https://www.remotion.dev';
const sourcePreview = useMemo(
() => makeSourceControlsVisible(request.element.sourceCode),
[request.element.sourceCode],
@@ -1058,12 +1061,14 @@ export const ElementInstallConfirmation: React.FC<{
</section>
) : null}
- <div style={warningStyle}>
- <WarningTriangle style={warningIconStyle} />
- <p style={warningDescriptionStyle}>
- Installed code can access your files and network.
- </p>
- </div>
+ {isOfficialRemotionSource ? null : (
+ <div style={warningStyle}>
+ <WarningTriangle style={warningIconStyle} />
+ <p style={warningDescriptionStyle}>
+ Installed code can access your files and network.
+ </p>
+ </div>
+ )}
<details style={sourceDetailsStyle}>
<summary