Skip to content

🎥 Make videos programmatically with React

Update RemotionRoot.tsx

Jonny Burger76758e609b8e
diff --git a/packages/core/src/RemotionRoot.tsx b/packages/core/src/RemotionRoot.tsx
index 9a5d830af1..dfef0a8923 100644
--- a/packages/core/src/RemotionRoot.tsx
+++ b/packages/core/src/RemotionRoot.tsx
@@ -162,7 +162,10 @@ export const RemotionRoot: React.FC = ({children}) => {
<TimelineContext.Provider value={timelineContextValue}>
<SetTimelineContext.Provider value={setTimelineContextValue}>
<CompositionManager.Provider value={contextValue}>
- <SharedAudioContextProvider numberOfAudioTags={0}>
+ <SharedAudioContextProvider
+ // In the preview, which is mostly played on Desktop, we opt out of the autoplay policy fix as described in https://github.com/remotion-dev/remotion/pull/554, as it mostly applies to mobile.
+ numberOfAudioTags={0}
+ >
{children}
</SharedAudioContextProvider>
</CompositionManager.Provider>