remotion 4.0.0-lambda.1 → 4.0.0-newpathfunctions.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (504) hide show
  1. package/LICENSE.md +8 -8
  2. package/README.md +30 -19
  3. package/dist/AbsoluteFill.d.ts +2 -2
  4. package/dist/AbsoluteFill.js +7 -7
  5. package/dist/CanUseRemotionHooks.d.ts +5 -0
  6. package/dist/CanUseRemotionHooks.js +10 -0
  7. package/dist/Clipper.d.ts +7 -0
  8. package/dist/Clipper.js +24 -0
  9. package/dist/Composition.d.ts +3 -1
  10. package/dist/Composition.js +34 -10
  11. package/dist/CompositionManager.d.ts +9 -8
  12. package/dist/CompositionManager.js +9 -3
  13. package/dist/Folder.d.ts +1 -1
  14. package/dist/Folder.js +0 -0
  15. package/dist/IFrame.d.ts +0 -0
  16. package/dist/IFrame.js +0 -0
  17. package/dist/Img.d.ts +0 -0
  18. package/dist/Img.js +31 -21
  19. package/dist/LayerMaster.d.ts +8 -0
  20. package/dist/LayerMaster.js +39 -0
  21. package/dist/NativeLayers.d.ts +13 -0
  22. package/dist/NativeLayers.js +29 -0
  23. package/dist/Null.d.ts +2 -0
  24. package/dist/Null.js +25 -0
  25. package/dist/RemotionRoot.d.ts +1 -0
  26. package/dist/RemotionRoot.js +9 -6
  27. package/dist/Sequence.d.ts +13 -4
  28. package/dist/Sequence.js +38 -30
  29. package/dist/Still.d.ts +1 -1
  30. package/dist/Still.js +0 -0
  31. package/dist/absolute-src.d.ts +0 -0
  32. package/dist/absolute-src.js +0 -0
  33. package/dist/asset-types.d.ts +1 -4
  34. package/dist/asset-types.js +0 -0
  35. package/dist/audio/Audio.d.ts +5 -3
  36. package/dist/audio/Audio.js +24 -4
  37. package/dist/audio/AudioForDevelopment.d.ts +6 -2
  38. package/dist/audio/AudioForDevelopment.js +42 -6
  39. package/dist/audio/AudioForRendering.d.ts +9 -2
  40. package/dist/audio/AudioForRendering.js +48 -5
  41. package/dist/audio/index.d.ts +0 -0
  42. package/dist/audio/index.js +0 -0
  43. package/dist/audio/props.d.ts +4 -2
  44. package/dist/audio/props.js +0 -0
  45. package/dist/audio/shared-audio-tags.d.ts +9 -4
  46. package/dist/audio/shared-audio-tags.js +117 -45
  47. package/dist/audio/use-audio-frame.d.ts +0 -0
  48. package/dist/audio/use-audio-frame.js +0 -0
  49. package/dist/bezier.d.ts +0 -0
  50. package/dist/bezier.js +0 -0
  51. package/dist/config/input-props.d.ts +0 -0
  52. package/dist/config/input-props.js +12 -14
  53. package/dist/config.d.ts +285 -0
  54. package/dist/config.js +21 -0
  55. package/dist/default-css.d.ts +1 -0
  56. package/dist/default-css.js +9 -2
  57. package/dist/delay-render.d.ts +0 -0
  58. package/dist/delay-render.js +4 -4
  59. package/dist/easing.d.ts +0 -0
  60. package/dist/easing.js +0 -0
  61. package/dist/freeze.d.ts +0 -0
  62. package/dist/freeze.js +0 -0
  63. package/dist/get-asset-file-name.d.ts +0 -0
  64. package/dist/get-asset-file-name.js +0 -0
  65. package/dist/get-compositions-from-markup.d.ts +3 -0
  66. package/dist/get-compositions-from-markup.js +19 -0
  67. package/dist/get-environment.d.ts +1 -0
  68. package/dist/get-environment.js +14 -2
  69. package/dist/get-preview-dom-element.d.ts +0 -0
  70. package/dist/get-preview-dom-element.js +0 -0
  71. package/dist/get-static-files.d.ts +17 -0
  72. package/dist/get-static-files.js +31 -0
  73. package/dist/get-timeline-clip-name.d.ts +0 -0
  74. package/dist/get-timeline-clip-name.js +2 -1
  75. package/dist/index.d.ts +33 -5
  76. package/dist/index.js +18 -3
  77. package/dist/internals.d.ts +50 -101
  78. package/dist/internals.js +16 -91
  79. package/dist/interpolate-colors.d.ts +0 -0
  80. package/dist/interpolate-colors.js +0 -0
  81. package/dist/interpolate.d.ts +0 -0
  82. package/dist/interpolate.js +0 -0
  83. package/dist/is-approximately-the-same.d.ts +0 -0
  84. package/dist/is-approximately-the-same.js +0 -0
  85. package/dist/is-player.d.ts +3 -0
  86. package/dist/is-player.js +14 -0
  87. package/dist/layers.d.ts +24 -0
  88. package/dist/layers.js +149 -0
  89. package/dist/loading-indicator.d.ts +0 -0
  90. package/dist/loading-indicator.js +0 -0
  91. package/dist/loop/index.d.ts +2 -2
  92. package/dist/loop/index.js +7 -5
  93. package/dist/multiple-versions-warning.d.ts +0 -0
  94. package/dist/multiple-versions-warning.js +23 -4
  95. package/dist/nonce.d.ts +0 -0
  96. package/dist/nonce.js +0 -0
  97. package/dist/play-and-handle-not-allowed-error.d.ts +1 -1
  98. package/dist/play-and-handle-not-allowed-error.js +4 -0
  99. package/dist/portal-node.d.ts +0 -0
  100. package/dist/portal-node.js +0 -0
  101. package/dist/prefetch-state.d.ts +8 -0
  102. package/dist/prefetch-state.js +27 -0
  103. package/dist/prefetch.d.ts +9 -0
  104. package/dist/prefetch.js +108 -0
  105. package/dist/random.d.ts +2 -1
  106. package/dist/random.js +0 -0
  107. package/dist/register-root.d.ts +1 -1
  108. package/dist/register-root.js +3 -0
  109. package/dist/series/flatten-children.d.ts +1 -1
  110. package/dist/series/flatten-children.js +0 -0
  111. package/dist/series/index.d.ts +4 -4
  112. package/dist/series/index.js +4 -2
  113. package/dist/setup-env-variables.d.ts +0 -0
  114. package/dist/setup-env-variables.js +0 -0
  115. package/dist/spring/index.d.ts +8 -4
  116. package/dist/spring/index.js +21 -6
  117. package/dist/spring/measure-spring.d.ts +1 -1
  118. package/dist/spring/measure-spring.js +1 -1
  119. package/dist/spring/spring-utils.d.ts +0 -0
  120. package/dist/spring/spring-utils.js +0 -0
  121. package/dist/static-file.d.ts +4 -0
  122. package/dist/static-file.js +10 -0
  123. package/dist/timeline-position-state.d.ts +1 -1
  124. package/dist/timeline-position-state.js +0 -0
  125. package/dist/truthy.d.ts +0 -0
  126. package/dist/truthy.js +0 -0
  127. package/dist/use-current-frame.d.ts +0 -1
  128. package/dist/use-current-frame.js +10 -7
  129. package/dist/use-lazy-component.d.ts +3 -3
  130. package/dist/use-lazy-component.js +0 -0
  131. package/dist/use-media-in-timeline.d.ts +4 -3
  132. package/dist/use-media-in-timeline.js +13 -6
  133. package/dist/use-media-playback.d.ts +5 -2
  134. package/dist/use-media-playback.js +11 -6
  135. package/dist/use-media-tag-volume.d.ts +1 -1
  136. package/dist/use-media-tag-volume.js +0 -0
  137. package/dist/use-sync-volume-with-media-tag.d.ts +2 -2
  138. package/dist/use-sync-volume-with-media-tag.js +1 -0
  139. package/dist/use-unsafe-video-config.d.ts +1 -1
  140. package/dist/use-unsafe-video-config.js +0 -0
  141. package/dist/use-video-config.d.ts +1 -1
  142. package/dist/use-video-config.js +10 -1
  143. package/dist/use-video.d.ts +13 -1
  144. package/dist/use-video.js +16 -3
  145. package/dist/validate-media-props.d.ts +3 -3
  146. package/dist/validate-media-props.js +0 -0
  147. package/dist/validate-start-from-props.d.ts +0 -0
  148. package/dist/validate-start-from-props.js +0 -0
  149. package/dist/validation/validate-composition-id.d.ts +0 -0
  150. package/dist/validation/validate-composition-id.js +0 -0
  151. package/dist/validation/validate-dimensions.d.ts +0 -0
  152. package/dist/validation/validate-dimensions.js +0 -0
  153. package/dist/validation/validate-duration-in-frames.d.ts +0 -0
  154. package/dist/validation/validate-duration-in-frames.js +0 -0
  155. package/dist/validation/validate-folder-name.d.ts +0 -0
  156. package/dist/validation/validate-folder-name.js +0 -0
  157. package/dist/validation/validate-fps.d.ts +1 -1
  158. package/dist/validation/validate-fps.js +4 -1
  159. package/dist/validation/validate-offthreadvideo-image-format.d.ts +1 -0
  160. package/dist/validation/validate-offthreadvideo-image-format.js +15 -0
  161. package/dist/validation/validation-spring-duration.d.ts +1 -0
  162. package/dist/validation/validation-spring-duration.js +21 -0
  163. package/dist/version.d.ts +1 -0
  164. package/dist/version.js +5 -0
  165. package/dist/video/NativeVideo.d.ts +5 -0
  166. package/dist/video/NativeVideo.js +33 -0
  167. package/dist/video/NativeVideoForRendering.d.ts +8 -0
  168. package/dist/video/NativeVideoForRendering.js +14 -0
  169. package/dist/video/OffthreadVideo.d.ts +2 -2
  170. package/dist/video/OffthreadVideo.js +10 -2
  171. package/dist/video/OffthreadVideoForRendering.d.ts +1 -1
  172. package/dist/video/OffthreadVideoForRendering.js +24 -13
  173. package/dist/video/Video.d.ts +5 -3
  174. package/dist/video/Video.js +25 -4
  175. package/dist/video/VideoForDevelopment.d.ts +10 -2
  176. package/dist/video/VideoForDevelopment.js +75 -7
  177. package/dist/video/VideoForRendering.d.ts +9 -2
  178. package/dist/video/VideoForRendering.js +80 -23
  179. package/dist/video/duration-state.d.ts +17 -0
  180. package/dist/video/duration-state.js +34 -0
  181. package/dist/video/get-current-time.d.ts +2 -1
  182. package/dist/video/get-current-time.js +7 -7
  183. package/dist/video/index.d.ts +1 -1
  184. package/dist/video/index.js +0 -0
  185. package/dist/video/props.d.ts +9 -3
  186. package/dist/video/props.js +0 -0
  187. package/dist/video/video-fragment.d.ts +12 -0
  188. package/dist/video/video-fragment.js +60 -0
  189. package/dist/video-config.d.ts +0 -0
  190. package/dist/video-config.js +0 -0
  191. package/dist/volume-position-state.d.ts +0 -0
  192. package/dist/volume-position-state.js +0 -0
  193. package/dist/volume-prop.d.ts +2 -1
  194. package/dist/volume-prop.js +4 -3
  195. package/dist/warn-about-non-seekable-media.d.ts +1 -1
  196. package/dist/warn-about-non-seekable-media.js +14 -2
  197. package/dist/wrap-remotion-context.d.ts +5 -0
  198. package/dist/wrap-remotion-context.js +13 -1
  199. package/package.json +26 -16
  200. package/.turbo/turbo-build.log +0 -5
  201. package/dist/AbsoluteFill.d.ts.map +0 -1
  202. package/dist/AbsoluteFill.js.map +0 -1
  203. package/dist/Composition.d.ts.map +0 -1
  204. package/dist/Composition.js.map +0 -1
  205. package/dist/CompositionManager.d.ts.map +0 -1
  206. package/dist/CompositionManager.js.map +0 -1
  207. package/dist/IFrame.d.ts.map +0 -1
  208. package/dist/IFrame.js.map +0 -1
  209. package/dist/Img.d.ts.map +0 -1
  210. package/dist/Img.js.map +0 -1
  211. package/dist/RemotionRoot.d.ts.map +0 -1
  212. package/dist/RemotionRoot.js.map +0 -1
  213. package/dist/Still.d.ts.map +0 -1
  214. package/dist/Still.js.map +0 -1
  215. package/dist/absolute-src.d.ts.map +0 -1
  216. package/dist/absolute-src.js.map +0 -1
  217. package/dist/asset-types.d.ts.map +0 -1
  218. package/dist/asset-types.js.map +0 -1
  219. package/dist/audio/Audio.d.ts.map +0 -1
  220. package/dist/audio/Audio.js.map +0 -1
  221. package/dist/audio/AudioForDevelopment.d.ts.map +0 -1
  222. package/dist/audio/AudioForDevelopment.js.map +0 -1
  223. package/dist/audio/AudioForRendering.d.ts.map +0 -1
  224. package/dist/audio/AudioForRendering.js.map +0 -1
  225. package/dist/audio/index.d.ts.map +0 -1
  226. package/dist/audio/index.js.map +0 -1
  227. package/dist/audio/props.d.ts.map +0 -1
  228. package/dist/audio/props.js.map +0 -1
  229. package/dist/audio/shared-audio-tags.d.ts.map +0 -1
  230. package/dist/audio/shared-audio-tags.js.map +0 -1
  231. package/dist/audio/use-audio-frame.d.ts.map +0 -1
  232. package/dist/audio/use-audio-frame.js.map +0 -1
  233. package/dist/bezier.d.ts.map +0 -1
  234. package/dist/bezier.js.map +0 -1
  235. package/dist/compress-assets.d.ts +0 -7
  236. package/dist/compress-assets.d.ts.map +0 -1
  237. package/dist/compress-assets.js +0 -25
  238. package/dist/compress-assets.js.map +0 -1
  239. package/dist/config/browser-executable.d.ts +0 -3
  240. package/dist/config/browser-executable.d.ts.map +0 -1
  241. package/dist/config/browser-executable.js +0 -12
  242. package/dist/config/browser-executable.js.map +0 -1
  243. package/dist/config/browser.d.ts +0 -4
  244. package/dist/config/browser.d.ts.map +0 -1
  245. package/dist/config/browser.js +0 -19
  246. package/dist/config/browser.js.map +0 -1
  247. package/dist/config/bundle-out-dir.d.ts +0 -2
  248. package/dist/config/bundle-out-dir.js +0 -12
  249. package/dist/config/chromium-flags.d.ts +0 -10
  250. package/dist/config/chromium-flags.d.ts.map +0 -1
  251. package/dist/config/chromium-flags.js +0 -34
  252. package/dist/config/chromium-flags.js.map +0 -1
  253. package/dist/config/codec.d.ts +0 -17
  254. package/dist/config/codec.d.ts.map +0 -1
  255. package/dist/config/codec.js +0 -103
  256. package/dist/config/codec.js.map +0 -1
  257. package/dist/config/concurrency.d.ts +0 -3
  258. package/dist/config/concurrency.d.ts.map +0 -1
  259. package/dist/config/concurrency.js +0 -15
  260. package/dist/config/concurrency.js.map +0 -1
  261. package/dist/config/crf.d.ts +0 -9
  262. package/dist/config/crf.d.ts.map +0 -1
  263. package/dist/config/crf.js +0 -83
  264. package/dist/config/crf.js.map +0 -1
  265. package/dist/config/env-file.d.ts +0 -2
  266. package/dist/config/env-file.d.ts.map +0 -1
  267. package/dist/config/env-file.js +0 -10
  268. package/dist/config/env-file.js.map +0 -1
  269. package/dist/config/every-nth-file.d.ts +0 -2
  270. package/dist/config/every-nth-file.js +0 -12
  271. package/dist/config/ffmpeg-executable.d.ts +0 -5
  272. package/dist/config/ffmpeg-executable.d.ts.map +0 -1
  273. package/dist/config/ffmpeg-executable.js +0 -21
  274. package/dist/config/ffmpeg-executable.js.map +0 -1
  275. package/dist/config/frame-range.d.ts +0 -5
  276. package/dist/config/frame-range.d.ts.map +0 -1
  277. package/dist/config/frame-range.js +0 -80
  278. package/dist/config/frame-range.js.map +0 -1
  279. package/dist/config/image-format.d.ts +0 -8
  280. package/dist/config/image-format.d.ts.map +0 -1
  281. package/dist/config/image-format.js +0 -37
  282. package/dist/config/image-format.js.map +0 -1
  283. package/dist/config/image-sequence.d.ts +0 -3
  284. package/dist/config/image-sequence.d.ts.map +0 -1
  285. package/dist/config/image-sequence.js +0 -15
  286. package/dist/config/image-sequence.js.map +0 -1
  287. package/dist/config/index.d.ts +0 -167
  288. package/dist/config/index.d.ts.map +0 -1
  289. package/dist/config/index.js +0 -180
  290. package/dist/config/index.js.map +0 -1
  291. package/dist/config/input-props.d.ts.map +0 -1
  292. package/dist/config/input-props.js.map +0 -1
  293. package/dist/config/log.d.ts +0 -7
  294. package/dist/config/log.d.ts.map +0 -1
  295. package/dist/config/log.js +0 -25
  296. package/dist/config/log.js.map +0 -1
  297. package/dist/config/loop.d.ts +0 -3
  298. package/dist/config/loop.js +0 -15
  299. package/dist/config/max-timeline-tracks.d.ts +0 -2
  300. package/dist/config/max-timeline-tracks.d.ts.map +0 -1
  301. package/dist/config/max-timeline-tracks.js +0 -24
  302. package/dist/config/max-timeline-tracks.js.map +0 -1
  303. package/dist/config/override-webpack.d.ts +0 -6
  304. package/dist/config/override-webpack.d.ts.map +0 -1
  305. package/dist/config/override-webpack.js +0 -14
  306. package/dist/config/override-webpack.js.map +0 -1
  307. package/dist/config/overwrite.d.ts +0 -3
  308. package/dist/config/overwrite.d.ts.map +0 -1
  309. package/dist/config/overwrite.js +0 -14
  310. package/dist/config/overwrite.js.map +0 -1
  311. package/dist/config/pixel-format.d.ts +0 -8
  312. package/dist/config/pixel-format.d.ts.map +0 -1
  313. package/dist/config/pixel-format.js +0 -38
  314. package/dist/config/pixel-format.js.map +0 -1
  315. package/dist/config/preview-server.d.ts +0 -2
  316. package/dist/config/preview-server.d.ts.map +0 -1
  317. package/dist/config/preview-server.js +0 -20
  318. package/dist/config/preview-server.js.map +0 -1
  319. package/dist/config/prores-profile.d.ts +0 -7
  320. package/dist/config/prores-profile.d.ts.map +0 -1
  321. package/dist/config/prores-profile.js +0 -32
  322. package/dist/config/prores-profile.js.map +0 -1
  323. package/dist/config/public-path.d.ts +0 -2
  324. package/dist/config/public-path.js +0 -12
  325. package/dist/config/quality.d.ts +0 -2
  326. package/dist/config/quality.d.ts.map +0 -1
  327. package/dist/config/quality.js +0 -17
  328. package/dist/config/quality.js.map +0 -1
  329. package/dist/config/scale.d.ts +0 -3
  330. package/dist/config/scale.d.ts.map +0 -1
  331. package/dist/config/scale.js +0 -15
  332. package/dist/config/scale.js.map +0 -1
  333. package/dist/config/still-frame.d.ts +0 -2
  334. package/dist/config/still-frame.d.ts.map +0 -1
  335. package/dist/config/still-frame.js +0 -12
  336. package/dist/config/still-frame.js.map +0 -1
  337. package/dist/config/timeout.d.ts +0 -2
  338. package/dist/config/timeout.d.ts.map +0 -1
  339. package/dist/config/timeout.js +0 -17
  340. package/dist/config/timeout.js.map +0 -1
  341. package/dist/config/webpack-caching.d.ts +0 -3
  342. package/dist/config/webpack-caching.d.ts.map +0 -1
  343. package/dist/config/webpack-caching.js +0 -16
  344. package/dist/config/webpack-caching.js.map +0 -1
  345. package/dist/default-css.d.ts.map +0 -1
  346. package/dist/default-css.js.map +0 -1
  347. package/dist/delay-render.d.ts.map +0 -1
  348. package/dist/delay-render.js.map +0 -1
  349. package/dist/easing.d.ts.map +0 -1
  350. package/dist/easing.js.map +0 -1
  351. package/dist/feature-flags.d.ts +0 -1
  352. package/dist/feature-flags.d.ts.map +0 -1
  353. package/dist/feature-flags.js +0 -7
  354. package/dist/feature-flags.js.map +0 -1
  355. package/dist/freeze.d.ts.map +0 -1
  356. package/dist/freeze.js.map +0 -1
  357. package/dist/get-asset-file-name.d.ts.map +0 -1
  358. package/dist/get-asset-file-name.js.map +0 -1
  359. package/dist/get-environment.d.ts.map +0 -1
  360. package/dist/get-environment.js.map +0 -1
  361. package/dist/get-preview-dom-element.d.ts.map +0 -1
  362. package/dist/get-preview-dom-element.js.map +0 -1
  363. package/dist/get-timeline-clip-name.d.ts.map +0 -1
  364. package/dist/get-timeline-clip-name.js.map +0 -1
  365. package/dist/index.d.ts.map +0 -1
  366. package/dist/index.js.map +0 -1
  367. package/dist/initial-frame.d.ts +0 -2
  368. package/dist/initial-frame.d.ts.map +0 -1
  369. package/dist/initial-frame.js +0 -12
  370. package/dist/initial-frame.js.map +0 -1
  371. package/dist/internals.d.ts.map +0 -1
  372. package/dist/internals.js.map +0 -1
  373. package/dist/interpolate.d.ts.map +0 -1
  374. package/dist/interpolate.js.map +0 -1
  375. package/dist/interpolateColors.d.ts +0 -5
  376. package/dist/interpolateColors.d.ts.map +0 -1
  377. package/dist/interpolateColors.js +0 -401
  378. package/dist/interpolateColors.js.map +0 -1
  379. package/dist/is-approximately-the-same.d.ts.map +0 -1
  380. package/dist/is-approximately-the-same.js.map +0 -1
  381. package/dist/is-audio-codec.d.ts +0 -2
  382. package/dist/is-audio-codec.d.ts.map +0 -1
  383. package/dist/is-audio-codec.js +0 -7
  384. package/dist/is-audio-codec.js.map +0 -1
  385. package/dist/loop/index.d.ts.map +0 -1
  386. package/dist/loop/index.js.map +0 -1
  387. package/dist/multiple-versions-warning.d.ts.map +0 -1
  388. package/dist/multiple-versions-warning.js.map +0 -1
  389. package/dist/nonce.d.ts.map +0 -1
  390. package/dist/nonce.js.map +0 -1
  391. package/dist/perf/index.d.ts +0 -5
  392. package/dist/perf/index.d.ts.map +0 -1
  393. package/dist/perf/index.js +0 -35
  394. package/dist/perf/index.js.map +0 -1
  395. package/dist/play-and-handle-not-allowed-error.d.ts.map +0 -1
  396. package/dist/play-and-handle-not-allowed-error.js.map +0 -1
  397. package/dist/random.d.ts.map +0 -1
  398. package/dist/random.js.map +0 -1
  399. package/dist/register-root.d.ts.map +0 -1
  400. package/dist/register-root.js.map +0 -1
  401. package/dist/sequencing/index.d.ts +0 -19
  402. package/dist/sequencing/index.d.ts.map +0 -1
  403. package/dist/sequencing/index.js +0 -123
  404. package/dist/sequencing/index.js.map +0 -1
  405. package/dist/series/flatten-children.d.ts.map +0 -1
  406. package/dist/series/flatten-children.js.map +0 -1
  407. package/dist/series/index.d.ts.map +0 -1
  408. package/dist/series/index.js.map +0 -1
  409. package/dist/setup-env-variables.d.ts.map +0 -1
  410. package/dist/setup-env-variables.js.map +0 -1
  411. package/dist/spring/index.d.ts.map +0 -1
  412. package/dist/spring/index.js.map +0 -1
  413. package/dist/spring/measure-spring.d.ts.map +0 -1
  414. package/dist/spring/measure-spring.js.map +0 -1
  415. package/dist/spring/spring-utils.d.ts.map +0 -1
  416. package/dist/spring/spring-utils.js.map +0 -1
  417. package/dist/static-file.d.ts.map +0 -1
  418. package/dist/static-file.js.map +0 -1
  419. package/dist/timeline-inout-position-state.d.ts +0 -12
  420. package/dist/timeline-inout-position-state.d.ts.map +0 -1
  421. package/dist/timeline-inout-position-state.js +0 -23
  422. package/dist/timeline-inout-position-state.js.map +0 -1
  423. package/dist/timeline-position-state.d.ts.map +0 -1
  424. package/dist/timeline-position-state.js.map +0 -1
  425. package/dist/timeout.d.ts +0 -2
  426. package/dist/timeout.d.ts.map +0 -1
  427. package/dist/timeout.js +0 -12
  428. package/dist/timeout.js.map +0 -1
  429. package/dist/truthy.d.ts.map +0 -1
  430. package/dist/truthy.js.map +0 -1
  431. package/dist/use-frame.d.ts +0 -7
  432. package/dist/use-frame.d.ts.map +0 -1
  433. package/dist/use-frame.js +0 -25
  434. package/dist/use-frame.js.map +0 -1
  435. package/dist/use-lazy-component.d.ts.map +0 -1
  436. package/dist/use-lazy-component.js.map +0 -1
  437. package/dist/use-media-in-timeline.d.ts.map +0 -1
  438. package/dist/use-media-in-timeline.js.map +0 -1
  439. package/dist/use-media-playback.d.ts.map +0 -1
  440. package/dist/use-media-playback.js.map +0 -1
  441. package/dist/use-media-tag-volume.d.ts.map +0 -1
  442. package/dist/use-media-tag-volume.js.map +0 -1
  443. package/dist/use-sync-volume-with-media-tag.d.ts.map +0 -1
  444. package/dist/use-sync-volume-with-media-tag.js.map +0 -1
  445. package/dist/use-unsafe-video-config.d.ts.map +0 -1
  446. package/dist/use-unsafe-video-config.js.map +0 -1
  447. package/dist/use-video-config.d.ts.map +0 -1
  448. package/dist/use-video-config.js.map +0 -1
  449. package/dist/use-video.d.ts.map +0 -1
  450. package/dist/use-video.js.map +0 -1
  451. package/dist/validate-media-props.d.ts.map +0 -1
  452. package/dist/validate-media-props.js.map +0 -1
  453. package/dist/validate-start-from-props.d.ts.map +0 -1
  454. package/dist/validate-start-from-props.js.map +0 -1
  455. package/dist/validation/validate-composition-id.d.ts.map +0 -1
  456. package/dist/validation/validate-composition-id.js.map +0 -1
  457. package/dist/validation/validate-dimensions.d.ts.map +0 -1
  458. package/dist/validation/validate-dimensions.js.map +0 -1
  459. package/dist/validation/validate-duration-in-frames.d.ts.map +0 -1
  460. package/dist/validation/validate-duration-in-frames.js.map +0 -1
  461. package/dist/validation/validate-every-nth-frame.d.ts +0 -1
  462. package/dist/validation/validate-every-nth-frame.js +0 -21
  463. package/dist/validation/validate-folder-name.d.ts.map +0 -1
  464. package/dist/validation/validate-folder-name.js.map +0 -1
  465. package/dist/validation/validate-fps.d.ts.map +0 -1
  466. package/dist/validation/validate-fps.js.map +0 -1
  467. package/dist/validation/validate-frame.d.ts +0 -1
  468. package/dist/validation/validate-frame.d.ts.map +0 -1
  469. package/dist/validation/validate-frame.js +0 -24
  470. package/dist/validation/validate-frame.js.map +0 -1
  471. package/dist/validation/validate-image-format.d.ts +0 -2
  472. package/dist/validation/validate-image-format.d.ts.map +0 -1
  473. package/dist/validation/validate-image-format.js +0 -9
  474. package/dist/validation/validate-image-format.js.map +0 -1
  475. package/dist/validation/validate-opengl-renderer.d.ts +0 -4
  476. package/dist/validation/validate-opengl-renderer.d.ts.map +0 -1
  477. package/dist/validation/validate-opengl-renderer.js +0 -14
  478. package/dist/validation/validate-opengl-renderer.js.map +0 -1
  479. package/dist/validation/validate-quality.d.ts +0 -1
  480. package/dist/validation/validate-quality.d.ts.map +0 -1
  481. package/dist/validation/validate-quality.js +0 -21
  482. package/dist/validation/validate-quality.js.map +0 -1
  483. package/dist/video/Video.d.ts.map +0 -1
  484. package/dist/video/Video.js.map +0 -1
  485. package/dist/video/VideoForDevelopment.d.ts.map +0 -1
  486. package/dist/video/VideoForDevelopment.js.map +0 -1
  487. package/dist/video/VideoForRendering.d.ts.map +0 -1
  488. package/dist/video/VideoForRendering.js.map +0 -1
  489. package/dist/video/get-current-time.d.ts.map +0 -1
  490. package/dist/video/get-current-time.js.map +0 -1
  491. package/dist/video/index.d.ts.map +0 -1
  492. package/dist/video/index.js.map +0 -1
  493. package/dist/video/props.d.ts.map +0 -1
  494. package/dist/video/props.js.map +0 -1
  495. package/dist/video-config.d.ts.map +0 -1
  496. package/dist/video-config.js.map +0 -1
  497. package/dist/volume-position-state.d.ts.map +0 -1
  498. package/dist/volume-position-state.js.map +0 -1
  499. package/dist/volume-prop.d.ts.map +0 -1
  500. package/dist/volume-prop.js.map +0 -1
  501. package/dist/warn-about-non-seekable-media.d.ts.map +0 -1
  502. package/dist/warn-about-non-seekable-media.js.map +0 -1
  503. package/dist/wrap-remotion-context.d.ts.map +0 -1
  504. package/dist/wrap-remotion-context.js.map +0 -1
@@ -27,9 +27,40 @@ exports.useSharedAudio = exports.SharedAudioContextProvider = exports.SharedAudi
27
27
  const jsx_runtime_1 = require("react/jsx-runtime");
28
28
  const react_1 = __importStar(require("react"));
29
29
  const EMPTY_AUDIO = 'data:audio/mp3;base64,/+MYxAAJcAV8AAgAABn//////+/gQ5BAMA+D4Pg+BAQBAEAwD4Pg+D4EBAEAQDAPg++hYBH///hUFQVBUFREDQNHmf///////+MYxBUGkAGIMAAAAP/29Xt6lUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDUAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV';
30
+ const compareProps = (obj1, obj2) => {
31
+ const keysA = Object.keys(obj1).sort();
32
+ const keysB = Object.keys(obj2).sort();
33
+ if (keysA.length !== keysB.length) {
34
+ return false;
35
+ }
36
+ for (let i = 0; i < keysA.length; i++) {
37
+ // Not the same keys
38
+ if (keysA[i] !== keysB[i]) {
39
+ return false;
40
+ }
41
+ // Not the same values
42
+ if (obj1[keysA[i]] !== obj2[keysB[i]]) {
43
+ return false;
44
+ }
45
+ }
46
+ return true;
47
+ };
48
+ const didPropChange = (key, newProp, prevProp) => {
49
+ // /music.mp3 and http://localhost:3000/music.mp3 are the same
50
+ if (key === 'src' &&
51
+ !prevProp.startsWith('data:') &&
52
+ !newProp.startsWith('data:')) {
53
+ return (new URL(prevProp, window.location.origin).toString() !==
54
+ new URL(newProp, window.location.origin).toString());
55
+ }
56
+ if (prevProp === newProp) {
57
+ return false;
58
+ }
59
+ return true;
60
+ };
30
61
  exports.SharedAudioContext = (0, react_1.createContext)(null);
31
62
  const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
32
- const [audios, setAudios] = (0, react_1.useState)([]);
63
+ const audios = (0, react_1.useRef)([]);
33
64
  const [initialNumberOfAudioTags] = (0, react_1.useState)(numberOfAudioTags);
34
65
  if (numberOfAudioTags !== initialNumberOfAudioTags) {
35
66
  throw new Error('The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.');
@@ -40,7 +71,38 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
40
71
  });
41
72
  }, [numberOfAudioTags]);
42
73
  const takenAudios = (0, react_1.useRef)(new Array(numberOfAudioTags).fill(false));
43
- const registerAudio = (0, react_1.useCallback)((aud) => {
74
+ const rerenderAudios = (0, react_1.useCallback)(() => {
75
+ refs.forEach(({ ref, id }) => {
76
+ var _a;
77
+ const data = (_a = audios.current) === null || _a === void 0 ? void 0 : _a.find((a) => a.id === id);
78
+ const { current } = ref;
79
+ if (!current) {
80
+ // Whole player has been unmounted, the refs don't exist anymore.
81
+ // It is not an error anymore though
82
+ return;
83
+ }
84
+ if (data === undefined) {
85
+ current.src = EMPTY_AUDIO;
86
+ return;
87
+ }
88
+ if (!data) {
89
+ throw new TypeError('Expected audio data to be there');
90
+ }
91
+ Object.keys(data.props).forEach((key) => {
92
+ // @ts-expect-error
93
+ if (didPropChange(key, data.props[key], current[key])) {
94
+ // @ts-expect-error
95
+ current[key] = data.props[key];
96
+ }
97
+ });
98
+ });
99
+ }, [refs]);
100
+ const registerAudio = (0, react_1.useCallback)((aud, audioId) => {
101
+ var _a, _b;
102
+ const found = (_a = audios.current) === null || _a === void 0 ? void 0 : _a.find((a) => a.audioId === audioId);
103
+ if (found) {
104
+ return found;
105
+ }
44
106
  const firstFreeAudio = takenAudios.current.findIndex((a) => a === false);
45
107
  if (firstFreeAudio === -1) {
46
108
  throw new Error(`Tried to simultaneously mount ${numberOfAudioTags + 1} <Audio /> tags at the same time. With the current settings, the maximum amount of <Audio /> tags is limited to ${numberOfAudioTags} at the same time. Remotion pre-mounts silent audio tags to help avoid browser autoplay restrictions. See https://remotion.dev/docs/player/autoplay#use-the-numberofsharedaudiotags-property for more information on how to increase this limit.`);
@@ -53,17 +115,14 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
53
115
  props: aud,
54
116
  id,
55
117
  el: ref,
118
+ audioId,
56
119
  };
57
- // We need a timeout because this state setting is triggered by another state being set, causing React to throw an error.
58
- // By setting a timeout, we are bypassing the error and allowing the state
59
- // to be updated in the next tick.
60
- // This can lead to a tiny delay of audio playback, improvement ideas are welcome.
61
- setTimeout(() => {
62
- setAudios((prevAudios) => [...prevAudios, newElem]);
63
- }, 4);
120
+ (_b = audios.current) === null || _b === void 0 ? void 0 : _b.push(newElem);
121
+ rerenderAudios();
64
122
  return newElem;
65
- }, [numberOfAudioTags, refs]);
123
+ }, [numberOfAudioTags, refs, rerenderAudios]);
66
124
  const unregisterAudio = (0, react_1.useCallback)((id) => {
125
+ var _a;
67
126
  const cloned = [...takenAudios.current];
68
127
  const index = refs.findIndex((r) => r.id === id);
69
128
  if (index === -1) {
@@ -71,23 +130,31 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
71
130
  }
72
131
  cloned[index] = false;
73
132
  takenAudios.current = cloned;
74
- setAudios((prevAudios) => {
75
- return prevAudios.filter((a) => a.id !== id);
76
- });
77
- }, [refs]);
78
- const updateAudio = (0, react_1.useCallback)((id, aud) => {
79
- setAudios((prevAudios) => {
80
- return prevAudios.map((prevA) => {
81
- if (prevA.id === id) {
82
- return {
83
- ...prevA,
84
- props: aud,
85
- };
133
+ audios.current = (_a = audios.current) === null || _a === void 0 ? void 0 : _a.filter((a) => a.id !== id);
134
+ rerenderAudios();
135
+ }, [refs, rerenderAudios]);
136
+ const updateAudio = (0, react_1.useCallback)(({ aud, audioId, id, }) => {
137
+ var _a;
138
+ let changed = false;
139
+ audios.current = (_a = audios.current) === null || _a === void 0 ? void 0 : _a.map((prevA) => {
140
+ if (prevA.id === id) {
141
+ const isTheSame = compareProps(aud, prevA.props);
142
+ if (isTheSame) {
143
+ return prevA;
86
144
  }
87
- return prevA;
88
- });
145
+ changed = true;
146
+ return {
147
+ ...prevA,
148
+ props: aud,
149
+ audioId,
150
+ };
151
+ }
152
+ return prevA;
89
153
  });
90
- }, []);
154
+ if (changed) {
155
+ rerenderAudios();
156
+ }
157
+ }, [rerenderAudios]);
91
158
  const playAllAudios = (0, react_1.useCallback)(() => {
92
159
  refs.forEach((ref) => {
93
160
  var _a;
@@ -110,41 +177,46 @@ const SharedAudioContextProvider = ({ children, numberOfAudioTags }) => {
110
177
  updateAudio,
111
178
  ]);
112
179
  return ((0, jsx_runtime_1.jsxs)(exports.SharedAudioContext.Provider, { value: value, children: [refs.map(({ id, ref }) => {
113
- const data = audios.find((a) => a.id === id);
114
- if (data === undefined) {
115
- return (0, jsx_runtime_1.jsx)("audio", { ref: ref, src: EMPTY_AUDIO }, id);
116
- }
117
- if (!data) {
118
- throw new TypeError('Expected audio data to be there');
119
- }
120
- return (0, jsx_runtime_1.jsx)("audio", { ref: ref, ...data.props }, id);
180
+ return (0, jsx_runtime_1.jsx)("audio", { ref: ref, src: EMPTY_AUDIO }, id);
121
181
  }), children] }));
122
182
  };
123
183
  exports.SharedAudioContextProvider = SharedAudioContextProvider;
124
- const useSharedAudio = (aud) => {
184
+ const useSharedAudio = (aud, audioId) => {
125
185
  const ctx = (0, react_1.useContext)(exports.SharedAudioContext);
186
+ /**
187
+ * We work around this in React 18 so an audio tag will only register itself once
188
+ */
126
189
  const [elem] = (0, react_1.useState)(() => {
127
190
  if (ctx && ctx.numberOfAudioTags > 0) {
128
- return ctx.registerAudio(aud);
191
+ return ctx.registerAudio(aud, audioId);
129
192
  }
130
193
  return {
131
194
  el: react_1.default.createRef(),
132
195
  id: Math.random(),
133
196
  props: aud,
197
+ audioId,
134
198
  };
135
199
  });
136
- (0, react_1.useEffect)(() => {
137
- return () => {
200
+ /**
201
+ * Effects in React 18 fire twice, and we are looking for a way to only fire it once.
202
+ * - useInsertionEffect only fires once. If it's available we are in React 18.
203
+ * - useLayoutEffect only fires once in React 17.
204
+ */
205
+ const effectToUse = react_1.useInsertionEffect !== null && react_1.useInsertionEffect !== void 0 ? react_1.useInsertionEffect : react_1.useLayoutEffect;
206
+ if (typeof document !== 'undefined') {
207
+ effectToUse(() => {
138
208
  if (ctx && ctx.numberOfAudioTags > 0) {
139
- ctx.unregisterAudio(elem.id);
209
+ ctx.updateAudio({ id: elem.id, aud, audioId });
140
210
  }
141
- };
142
- }, [ctx, elem.id]);
143
- (0, react_1.useEffect)(() => {
144
- if (ctx && ctx.numberOfAudioTags > 0) {
145
- ctx.updateAudio(elem.id, aud);
146
- }
147
- }, [aud, ctx, elem.id]);
211
+ }, [aud, ctx, elem.id, audioId]);
212
+ effectToUse(() => {
213
+ return () => {
214
+ if (ctx && ctx.numberOfAudioTags > 0) {
215
+ ctx.unregisterAudio(elem.id);
216
+ }
217
+ };
218
+ }, [ctx, elem.id]);
219
+ }
148
220
  return elem;
149
221
  };
150
222
  exports.useSharedAudio = useSharedAudio;
File without changes
File without changes
package/dist/bezier.d.ts CHANGED
File without changes
package/dist/bezier.js CHANGED
File without changes
File without changes
@@ -13,21 +13,19 @@ const warnOnceSSRImport = () => {
13
13
  console.warn(" typeof window === 'undefined' ? {} : getInputProps()");
14
14
  };
15
15
  const getInputProps = () => {
16
- if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
17
- if (typeof window === 'undefined') {
18
- warnOnceSSRImport();
19
- return {};
20
- }
21
- const param = window.remotion_inputProps;
22
- if (!param) {
23
- return {};
24
- }
25
- const parsed = JSON.parse(param);
26
- return parsed;
16
+ if (typeof window === 'undefined') {
17
+ warnOnceSSRImport();
18
+ return {};
27
19
  }
28
- if ((0, get_environment_1.getRemotionEnvironment)() === 'preview') {
29
- return process.env.INPUT_PROPS;
20
+ if ((0, get_environment_1.getRemotionEnvironment)() === 'player-development' ||
21
+ (0, get_environment_1.getRemotionEnvironment)() === 'player-production') {
22
+ throw new Error('You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.');
30
23
  }
31
- throw new Error('You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.');
24
+ const param = window.remotion_inputProps;
25
+ if (!param) {
26
+ return {};
27
+ }
28
+ const parsed = JSON.parse(param);
29
+ return parsed;
32
30
  };
33
31
  exports.getInputProps = getInputProps;
@@ -0,0 +1,285 @@
1
+ /**
2
+ * The configuration has moved to @remotion/cli.
3
+ * For the moment the type definitions are going to stay here
4
+ */
5
+ declare type Concurrency = number | null;
6
+ import type { Configuration } from 'webpack';
7
+ declare type WebpackConfiguration = Configuration;
8
+ declare type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration;
9
+ declare type BrowserExecutable = string | null;
10
+ declare type FrameRange = number | [number, number];
11
+ declare type FfmpegExecutable = string | null;
12
+ declare type Loop = number | null;
13
+ declare type CodecOrUndefined = 'h264' | 'h265' | 'vp8' | 'vp9' | 'mp3' | 'aac' | 'wav' | 'prores' | 'h264-mkv' | 'gif' | undefined;
14
+ declare type Crf = number | undefined;
15
+ declare type FlatConfig = ObjectConfig['Bundling'] & ObjectConfig['Log'] & ObjectConfig['Preview'] & ObjectConfig['Puppeteer'] & ObjectConfig['Output'] & ObjectConfig['Rendering'];
16
+ declare type ObjectConfig = {
17
+ /**
18
+ * @deprecated New flat config format: You can now replace `Config.Preview.` with `Config.`
19
+ */
20
+ readonly Preview: {
21
+ /**
22
+ * Change the maximum amount of tracks that are shown in the timeline.
23
+ * @param maxTracks The maximum amount of timeline tracks that you would like to show.
24
+ * @default 15
25
+ */
26
+ readonly setMaxTimelineTracks: (maxTracks: number) => void;
27
+ /**
28
+ * Enable Keyboard shortcuts in the Remotion Preview.
29
+ * @param enabled Boolean whether to enable the keyboard shortcuts
30
+ * @default true
31
+ */
32
+ readonly setKeyboardShortcutsEnabled: (enableShortcuts: boolean) => void;
33
+ /**
34
+ * Set number of shared audio tags. https://www.remotion.dev/docs/player/autoplay#use-the-numberofsharedaudiotags-property
35
+ * @param numberOfAudioTags
36
+ * @default 0
37
+ */
38
+ readonly setNumberOfSharedAudioTags: (numberOfAudioTags: number) => void;
39
+ /**
40
+ * Enable Webpack polling instead of file system listeners for hot reloading in the preview.
41
+ * This is useful if you are using a remote directory or a virtual machine.
42
+ * @param interval
43
+ * @default null
44
+ */
45
+ readonly setWebpackPollingInMilliseconds: (interval: number | null) => void;
46
+ /**
47
+ * Whether Remotion should open a browser when starting the Preview.
48
+ * @param should
49
+ * @default true
50
+ */
51
+ readonly setShouldOpenBrowser: (should: boolean) => void;
52
+ };
53
+ /**
54
+ * @deprecated New flat config format: You can now replace `Config.Bundling.` with `Config.`
55
+ */
56
+ readonly Bundling: {
57
+ /**
58
+ * Specify the entry point so you don't have to specify it in the
59
+ * CLI command
60
+ */
61
+ readonly setEntryPoint: (src: string) => void;
62
+ /**
63
+ * Pass in a function which takes the current Webpack config
64
+ * and return a modified Webpack configuration.
65
+ * Docs: http://remotion.dev/docs/webpack
66
+ */
67
+ readonly overrideWebpackConfig: (fn: WebpackOverrideFn) => void;
68
+ /**
69
+ * Whether Webpack bundles should be cached to make
70
+ * subsequent renders faster. Default: true
71
+ */
72
+ readonly setCachingEnabled: (flag: boolean) => void;
73
+ /**
74
+ * Define on which port Remotion should start it's HTTP servers during preview and rendering.
75
+ * By default, Remotion will try to find a free port.
76
+ * If you specify a port, but it's not available, Remotion will throw an error.
77
+ */
78
+ readonly setPort: (port: number | undefined) => void;
79
+ /**
80
+ * Define the location of the public/ directory.
81
+ * By default it is a folder named "public" inside the current working directory.
82
+ * You can set an absolute path or a relative path that will be resolved from the closest package.json location.
83
+ */
84
+ readonly setPublicDir: (publicDir: string | null) => void;
85
+ };
86
+ /**
87
+ * @deprecated New flat config format: You can now replace `Config.Log.` with `Config.`
88
+ */
89
+ readonly Log: {
90
+ /**
91
+ * Set the log level.
92
+ * Acceptable values: 'error' | 'warning' | 'info' | 'verbose'
93
+ * Default value: 'info'
94
+ *
95
+ * Set this to 'verbose' to get browser logs and other IO.
96
+ */
97
+ readonly setLevel: (newLogLevel: 'verbose' | 'info' | 'warn' | 'error') => void;
98
+ };
99
+ /**
100
+ * @deprecated New flat config format: You can now replace `Config.Puppeteer.` with `Config.`
101
+ */
102
+ readonly Puppeteer: {
103
+ /**
104
+ * Specify executable path for the browser to use.
105
+ * Default: null, which will make Remotion find or download a version of said browser.
106
+ */
107
+ readonly setBrowserExecutable: (newBrowserExecutablePath: BrowserExecutable) => void;
108
+ /**
109
+ * Set how many milliseconds a frame may take to render before it times out.
110
+ * Default: `30000`
111
+ */
112
+ readonly setDelayRenderTimeoutInMilliseconds: (newPuppeteerTimeout: number) => void;
113
+ /**
114
+ * @deprecated Renamed to `setDelayRenderTimeoutInMilliseconds`.
115
+ * Set how many milliseconds a frame may take to render before it times out.
116
+ * Default: `30000`
117
+ */
118
+ readonly setTimeoutInMilliseconds: (newPuppeteerTimeout: number) => void;
119
+ /**
120
+ * Setting deciding whether to disable CORS and other Chrome security features.
121
+ * Default: false
122
+ */
123
+ readonly setChromiumDisableWebSecurity: (should: boolean) => void;
124
+ /**
125
+ * Setting whether to ignore any invalid SSL certificates, such as self-signed ones.
126
+ * Default: false
127
+ */
128
+ readonly setChromiumIgnoreCertificateErrors: (should: boolean) => void;
129
+ /**
130
+ * If false, will open an actual browser during rendering to observe progress.
131
+ * Default: true
132
+ */
133
+ readonly setChromiumHeadlessMode: (should: boolean) => void;
134
+ /**
135
+ * Set the OpenGL rendering backend for Chrome. Possible values: 'egl', 'angle', 'swiftshader' and 'swangle'.
136
+ * Default: 'swangle' in Lambda, null elsewhere.
137
+ */
138
+ readonly setChromiumOpenGlRenderer: (renderer: 'swangle' | 'angle' | 'egl' | 'swiftshader') => void;
139
+ };
140
+ /**
141
+ * @deprecated New flat config format: You can now replace `Config.Rendering.` with `Config.`
142
+ */
143
+ readonly Rendering: {
144
+ /**
145
+ * Set a custom location for a .env file.
146
+ * Default: `.env`
147
+ */
148
+ readonly setDotEnvLocation: (file: string) => void;
149
+ /**
150
+ * Sets how many Puppeteer instances will work on rendering your video in parallel.
151
+ * Default: `null`, meaning half of the threads available on your CPU.
152
+ */
153
+ readonly setConcurrency: (newConcurrency: Concurrency) => void;
154
+ /**
155
+ * Set the JPEG quality for the frames.
156
+ * Must be between 0 and 100.
157
+ * Must be between 0 and 100.
158
+ * Default: 80
159
+ */
160
+ readonly setQuality: (q: number | undefined) => void;
161
+ /** Decide in which image format to render. Can be either 'jpeg' or 'png'.
162
+ * PNG is slower, but supports transparency.
163
+ */
164
+ readonly setImageFormat: (format: 'png' | 'jpeg' | 'none') => void;
165
+ /**
166
+ * Render only a subset of a video.
167
+ * Pass in a tuple [20, 30] to only render frames 20-30 into a video.
168
+ * Pass in a single number `20` to only render a single frame as an image.
169
+ * The frame count starts at 0.
170
+ */
171
+ readonly setFrameRange: (newFrameRange: FrameRange | null) => void;
172
+ /**
173
+ * Specify local ffmpeg executable.
174
+ * Default: null, which will use ffmpeg available in PATH.
175
+ */
176
+ readonly setFfmpegExecutable: (ffmpegPath: FfmpegExecutable) => void;
177
+ /**
178
+ * Specify local ffprobe executable.
179
+ * Default: null, which will use ffprobe available in PATH.
180
+ */
181
+ readonly setFfprobeExecutable: (ffprobePath: FfmpegExecutable) => void;
182
+ /**
183
+ * Scales the output dimensions by a factor.
184
+ * Default: 1.
185
+ */
186
+ readonly setScale: (newScale: number) => void;
187
+ /**
188
+ * Specify which frames should be picked for rendering a GIF
189
+ * Default: 1, which means every frame
190
+ * https://remotion.dev/docs/render-as-gif
191
+ */
192
+ readonly setEveryNthFrame: (frame: number) => void;
193
+ /**
194
+ * Specify the number of Loop a GIF should have.
195
+ * Default: null (means GIF will loop infinite)
196
+ */
197
+ readonly setNumberOfGifLoops: (newLoop: Loop) => void;
198
+ /**
199
+ * Disable audio output.
200
+ * Default: false
201
+ */
202
+ readonly setMuted: (muted: boolean) => void;
203
+ /**
204
+ * Don't render an audio track if it would be silent.
205
+ * Default: true
206
+ */
207
+ readonly setEnforceAudioTrack: (enforceAudioTrack: boolean) => void;
208
+ };
209
+ /**
210
+ * @deprecated New flat config format: You can now replace `Config.Output.` with `Config.`
211
+ */
212
+ readonly Output: {
213
+ /**
214
+ * Set the output file location string. Default: `out/{composition}.{codec}`
215
+ */
216
+ readonly setOutputLocation: (newOutputLocation: string) => void;
217
+ /**
218
+ * If the video file already exists, should Remotion overwrite
219
+ * the output? Default: true
220
+ */
221
+ readonly setOverwriteOutput: (newOverwrite: boolean) => void;
222
+ /**
223
+ * Sets the pixel format in FFMPEG.
224
+ * See https://trac.ffmpeg.org/wiki/Chroma%20Subsampling for an explanation.
225
+ * You can override this using the `--pixel-format` Cli flag.
226
+ */
227
+ readonly setPixelFormat: (format: 'yuv420p' | 'yuva420p' | 'yuv422p' | 'yuv444p' | 'yuv420p10le' | 'yuv422p10le' | 'yuv444p10le' | 'yuva444p10le') => void;
228
+ /**
229
+ * @deprecated Use setCodec() and setImageSequence() instead.
230
+ * Specify what kind of output you, either `mp4` or `png-sequence`.
231
+ */
232
+ readonly setOutputFormat: (newLegacyFormat: 'mp4' | 'png-sequence') => void;
233
+ /**
234
+ * Specify the codec for stitching the frames into a video.
235
+ * Can be `h264` (default), `h265`, `vp8` or `vp9`
236
+ */
237
+ readonly setCodec: (newCodec: CodecOrUndefined) => void;
238
+ /**
239
+ * Set the Constant Rate Factor to pass to FFMPEG.
240
+ * Lower values mean better quality, but be aware that the ranges of
241
+ * possible values greatly differs between codecs.
242
+ */
243
+ readonly setCrf: (newCrf: Crf) => void;
244
+ /**
245
+ * Set to true if don't want a video but an image sequence as the output.
246
+ */
247
+ readonly setImageSequence: (newImageSequence: boolean) => void;
248
+ /**
249
+ * Overrides the height of a composition
250
+ */
251
+ readonly overrideHeight: (newHeight: number) => void;
252
+ /**
253
+ * Overrides the width of a composition
254
+ */
255
+ readonly overrideWidth: (newWidth: number) => void;
256
+ /**
257
+ * Set the ProRes profile.
258
+ * This method is only valid if the codec has been set to 'prores'.
259
+ * Possible values: 4444-xq, 4444, hq, standard, light, proxy. Default: 'hq'
260
+ * See https://avpres.net/FFmpeg/im_ProRes.html for meaning of possible values.
261
+ */
262
+ readonly setProResProfile: (profile: '4444-xq' | '4444' | 'hq' | 'standard' | 'light' | 'proxy' | undefined) => void;
263
+ /**
264
+ * Override the arguments that Remotion passes to FFMPEG.
265
+ * Consult https://remotion.dev/docs/renderer/render-media#ffmpegoverride before using this feature.
266
+ */
267
+ readonly overrideFfmpegCommand: (command: (info: {
268
+ type: 'pre-stitcher' | 'stitcher';
269
+ args: string[];
270
+ }) => string[]) => void;
271
+ /**
272
+ * Set a target audio bitrate to be passed to FFMPEG.
273
+ */
274
+ readonly setAudioBitrate: (bitrate: string | null) => void;
275
+ /**
276
+ * Set a target video bitrate to be passed to FFMPEG.
277
+ * Mutually exclusive with setCrf().
278
+ */
279
+ readonly setVideoBitrate: (bitrate: string | null) => void;
280
+ };
281
+ };
282
+ export declare type ConfigType = ObjectConfig & FlatConfig;
283
+ export type { Concurrency, WebpackConfiguration, WebpackOverrideFn };
284
+ export declare const Config: ConfigType;
285
+ export declare const enableLegacyRemotionConfig: () => void;
package/dist/config.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * The configuration has moved to @remotion/cli.
4
+ * For the moment the type definitions are going to stay here
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.enableLegacyRemotionConfig = exports.Config = void 0;
8
+ const conf = {};
9
+ let enabled = false;
10
+ exports.Config = new Proxy(conf, {
11
+ get(target, prop, receiver) {
12
+ if (!enabled) {
13
+ throw new Error('To use the Remotion config file, you need to have @remotion/cli installed.\n- Make sure that all versions of Remotion are the same.\n- Make sure that @remotion/cli is installed.\n- Make sure Config is imported from "@remotion/cli", not "remotion".');
14
+ }
15
+ return Reflect.get(target, prop, receiver);
16
+ },
17
+ });
18
+ const enableLegacyRemotionConfig = () => {
19
+ enabled = true;
20
+ };
21
+ exports.enableLegacyRemotionConfig = enableLegacyRemotionConfig;
@@ -1,2 +1,3 @@
1
1
  export declare const injectCSS: (css: string) => void;
2
+ export declare const OFFTHREAD_VIDEO_CLASS_NAME = "__remotion_offthreadvideo";
2
3
  export declare const makeDefaultCSS: (scope: string | null, backgroundColor: string) => string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeDefaultCSS = exports.injectCSS = void 0;
3
+ exports.makeDefaultCSS = exports.OFFTHREAD_VIDEO_CLASS_NAME = exports.injectCSS = void 0;
4
4
  const injected = {};
5
5
  const injectCSS = (css) => {
6
6
  // Skip in node
@@ -13,10 +13,11 @@ const injectCSS = (css) => {
13
13
  const head = document.head || document.getElementsByTagName('head')[0];
14
14
  const style = document.createElement('style');
15
15
  style.appendChild(document.createTextNode(css));
16
- head.appendChild(style);
16
+ head.prepend(style);
17
17
  injected[css] = true;
18
18
  };
19
19
  exports.injectCSS = injectCSS;
20
+ exports.OFFTHREAD_VIDEO_CLASS_NAME = '__remotion_offthreadvideo';
20
21
  const makeDefaultCSS = (scope, backgroundColor) => {
21
22
  if (!scope) {
22
23
  return `
@@ -27,6 +28,9 @@ const makeDefaultCSS = (scope, backgroundColor) => {
27
28
  margin: 0;
28
29
  background-color: ${backgroundColor};
29
30
  }
31
+ .${exports.OFFTHREAD_VIDEO_CLASS_NAME} {
32
+ object-fit: contain;
33
+ }
30
34
  `;
31
35
  }
32
36
  return `
@@ -37,6 +41,9 @@ const makeDefaultCSS = (scope, backgroundColor) => {
37
41
  width: 100%;
38
42
  height: 100%;
39
43
  }
44
+ ${scope} .${exports.OFFTHREAD_VIDEO_CLASS_NAME} {
45
+ object-fit: contain;
46
+ }
40
47
  `;
41
48
  };
42
49
  exports.makeDefaultCSS = makeDefaultCSS;
File without changes
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.continueRender = exports.delayRender = exports.DELAY_RENDER_CALLSTACK_TOKEN = void 0;
4
4
  const get_environment_1 = require("./get-environment");
5
- const timeout_1 = require("./timeout");
6
5
  const truthy_1 = require("./truthy");
7
6
  if (typeof window !== 'undefined') {
8
7
  window.ready = false;
@@ -10,6 +9,7 @@ if (typeof window !== 'undefined') {
10
9
  let handles = [];
11
10
  const timeouts = {};
12
11
  exports.DELAY_RENDER_CALLSTACK_TOKEN = 'The delayRender was called:';
12
+ const defaultTimeout = 30000;
13
13
  /**
14
14
  * Call this function to tell Remotion to wait before capturing this frame until data has loaded. Use continueRender() to unblock the render.
15
15
  * @param label _optional_ A label to identify the call in case it does time out.
@@ -17,7 +17,7 @@ exports.DELAY_RENDER_CALLSTACK_TOKEN = 'The delayRender was called:';
17
17
  * @link https://www.remotion.dev/docs/delay-render
18
18
  */
19
19
  const delayRender = (label) => {
20
- var _a, _b;
20
+ var _a, _b, _c;
21
21
  if (typeof label !== 'string' && typeof label !== 'undefined') {
22
22
  throw new Error('The label parameter of delayRender() must be a string or undefined, got: ' +
23
23
  JSON.stringify(label));
@@ -27,8 +27,8 @@ const delayRender = (label) => {
27
27
  const called = (_b = (_a = Error().stack) === null || _a === void 0 ? void 0 : _a.replace(/^Error/g, '')) !== null && _b !== void 0 ? _b : '';
28
28
  if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
29
29
  const timeoutToUse = typeof window === 'undefined'
30
- ? timeout_1.DEFAULT_PUPPETEER_TIMEOUT
31
- : window.remotion_puppeteerTimeout - 2000;
30
+ ? defaultTimeout
31
+ : ((_c = window.remotion_puppeteerTimeout) !== null && _c !== void 0 ? _c : defaultTimeout) - 2000;
32
32
  timeouts[handle] = setTimeout(() => {
33
33
  const message = [
34
34
  `A delayRender()`,
package/dist/easing.d.ts CHANGED
File without changes
package/dist/easing.js CHANGED
File without changes
package/dist/freeze.d.ts CHANGED
File without changes
package/dist/freeze.js CHANGED
File without changes
File without changes