🎥 Make videos programmatically with React
move window.siteVersion and window.remotion_version to inde.html
Jonny Burger2fb1a2b20565
diff --git a/packages/bundler/renderEntry.tsx b/packages/bundler/renderEntry.tsxindex e585bfbff7..758ea7b0d7 100644--- a/packages/bundler/renderEntry.tsx+++ b/packages/bundler/renderEntry.tsx@@ -16,7 +16,6 @@ import type {import {AbsoluteFill,Internals,- VERSION,continueRender,delayRender,getInputProps,@@ -196,7 +195,7 @@ const waitForRootHandle = delayRender(timeoutInMilliseconds:typeof window === 'undefined'? DEFAULT_ROOT_COMPONENT_TIMEOUT- : window.remotion_puppeteerTimeout ?? DEFAULT_ROOT_COMPONENT_TIMEOUT,+ : (window.remotion_puppeteerTimeout ?? DEFAULT_ROOT_COMPONENT_TIMEOUT),},);@@ -343,7 +342,7 @@ if (typeof window !== 'undefined') {const inputProps =typeof window === 'undefined' || getRemotionEnvironment().isPlayer? {}- : getInputProps() ?? {};+ : (getInputProps() ?? {});return Promise.all(compositions.map(async (c): Promise<VideoConfigWithSerializedProps> => {@@ -414,7 +413,7 @@ if (typeof window !== 'undefined') {const inputProps =typeof window === 'undefined' || getRemotionEnvironment().isPlayer? {}- : getInputProps() ?? {};+ : (getInputProps() ?? {});const originalProps = {...(selectedComp.defaultProps ?? {}),@@ -454,7 +453,5 @@ if (typeof window !== 'undefined') {};};- window.siteVersion = '11';- window.remotion_version = VERSION;window.remotion_setBundleMode = setBundleModeAndUpdate;}diff --git a/packages/bundler/src/index-html.ts b/packages/bundler/src/index-html.tsindex 8f48380e6c..11863352cc 100644--- a/packages/bundler/src/index-html.ts+++ b/packages/bundler/src/index-html.ts@@ -5,7 +5,7 @@ import type {RenderDefaults,} from '@remotion/studio-shared';import type {StaticFile} from 'remotion';-import {Internals} from 'remotion';+import {Internals, VERSION} from 'remotion';export const indexHtml = ({publicPath,@@ -112,6 +112,10 @@ export const indexHtml = ({<script>window.remotion_publicFolderExists = ${publicFolderExists ? `"${publicFolderExists}"` : 'null'};</script>+ <script>+ window.siteVersion = '11';+ window.remotion_version = ${VERSION};+ </script><div id="video-container"></div><div id="${Internals.REMOTION_STUDIO_CONTAINER_ELEMENT}"></div>