remotion 3.3.8 → 3.3.9

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > remotion@3.3.7 build /Users/jonathanburger/remotion/packages/core
2
+ > remotion@3.3.8 build /Users/jonathanburger/remotion/packages/core
3
3
  > tsc -d
4
4
 
@@ -202,18 +202,20 @@ const useSharedAudio = (aud, audioId) => {
202
202
  * - useLayoutEffect only fires once in React 17.
203
203
  */
204
204
  const effectToUse = react_1.useInsertionEffect !== null && react_1.useInsertionEffect !== void 0 ? react_1.useInsertionEffect : react_1.useLayoutEffect;
205
- effectToUse(() => {
206
- if (ctx && ctx.numberOfAudioTags > 0) {
207
- ctx.updateAudio(elem.id, aud);
208
- }
209
- }, [aud, ctx, elem.id]);
210
- effectToUse(() => {
211
- return () => {
205
+ if (typeof document !== 'undefined') {
206
+ effectToUse(() => {
212
207
  if (ctx && ctx.numberOfAudioTags > 0) {
213
- ctx.unregisterAudio(elem.id);
208
+ ctx.updateAudio(elem.id, aud);
214
209
  }
215
- };
216
- }, [ctx, elem.id]);
210
+ }, [aud, ctx, elem.id]);
211
+ effectToUse(() => {
212
+ return () => {
213
+ if (ctx && ctx.numberOfAudioTags > 0) {
214
+ ctx.unregisterAudio(elem.id);
215
+ }
216
+ };
217
+ }, [ctx, elem.id]);
218
+ }
217
219
  return elem;
218
220
  };
219
221
  exports.useSharedAudio = useSharedAudio;
@@ -0,0 +1,2 @@
1
+ import type { StaticFile } from './static-file';
2
+ export declare const getStaticFiles: () => StaticFile[];
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStaticFiles = void 0;
4
+ let warnedServer = false;
5
+ let warnedPlayer = false;
6
+ const warnServerOnce = () => {
7
+ if (warnedServer) {
8
+ return;
9
+ }
10
+ warnedServer = true;
11
+ console.warn('Called getStaticFiles() on the server. The API is only available in the browser. An empty array was returned.');
12
+ };
13
+ const warnPlayerOnce = () => {
14
+ if (warnedPlayer) {
15
+ return;
16
+ }
17
+ warnedPlayer = true;
18
+ console.warn('Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Preview. An empty array was returned.');
19
+ };
20
+ const getStaticFiles = () => {
21
+ if (typeof document === 'undefined') {
22
+ warnServerOnce();
23
+ return [];
24
+ }
25
+ if (window.remotion_isPlayer) {
26
+ warnPlayerOnce();
27
+ return [];
28
+ }
29
+ return window.remotion_staticFiles;
30
+ };
31
+ exports.getStaticFiles = getStaticFiles;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "3.3.8";
1
+ export declare const VERSION = "3.3.9";
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Automatically generated on publish
5
- exports.VERSION = '3.3.8';
5
+ exports.VERSION = '3.3.9';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "3.3.8",
3
+ "version": "3.3.9",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "4d4c78cf83b5fd085f24d5fd19f4507815e200a7"
58
+ "gitHead": "86269c98522cb7ea280f8283fa6c57885b971b3b"
59
59
  }