remotion 4.0.39 → 4.0.40
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.
- package/dist/cjs/prefetch.d.ts +1 -0
- package/dist/cjs/prefetch.js +10 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +11 -12
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/dist/cjs/prefetch.d.ts
CHANGED
package/dist/cjs/prefetch.js
CHANGED
|
@@ -63,10 +63,18 @@ const prefetch = (src, options) => {
|
|
|
63
63
|
if (!buf) {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
+
if (!buf.type.startsWith('video/') &&
|
|
67
|
+
!buf.type.startsWith('audio/') &&
|
|
68
|
+
!(options === null || options === void 0 ? void 0 : options.contentType)) {
|
|
69
|
+
console.warn(`Called prefetch() on ${src} which returned a "Content-Type" of ${buf.type}. Prefetched content should have a proper content type (video/... or audio/...) or a contentType passed the options of prefetch(). Otherwise, prefetching will not work properly in all browsers.`);
|
|
70
|
+
}
|
|
71
|
+
const actualBlob = (options === null || options === void 0 ? void 0 : options.contentType)
|
|
72
|
+
? new Blob([buf], { type: options.contentType })
|
|
73
|
+
: buf;
|
|
66
74
|
if (method === 'base64') {
|
|
67
|
-
return blobToBase64(
|
|
75
|
+
return blobToBase64(actualBlob);
|
|
68
76
|
}
|
|
69
|
-
return URL.createObjectURL(
|
|
77
|
+
return URL.createObjectURL(actualBlob);
|
|
70
78
|
})
|
|
71
79
|
.then((url) => {
|
|
72
80
|
if (canceled) {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.
|
|
1
|
+
export declare const VERSION = "4.0.40";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -59,7 +59,7 @@ function truthy(value) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// Automatically generated on publish
|
|
62
|
-
const VERSION = '4.0.
|
|
62
|
+
const VERSION = '4.0.40';
|
|
63
63
|
|
|
64
64
|
const checkMultipleRemotionVersions = () => {
|
|
65
65
|
if (typeof globalThis === 'undefined') {
|
|
@@ -1318,10 +1318,18 @@ const prefetch = (src, options) => {
|
|
|
1318
1318
|
if (!buf) {
|
|
1319
1319
|
return;
|
|
1320
1320
|
}
|
|
1321
|
+
if (!buf.type.startsWith('video/') &&
|
|
1322
|
+
!buf.type.startsWith('audio/') &&
|
|
1323
|
+
!(options === null || options === void 0 ? void 0 : options.contentType)) {
|
|
1324
|
+
console.warn(`Called prefetch() on ${src} which returned a "Content-Type" of ${buf.type}. Prefetched content should have a proper content type (video/... or audio/...) or a contentType passed the options of prefetch(). Otherwise, prefetching will not work properly in all browsers.`);
|
|
1325
|
+
}
|
|
1326
|
+
const actualBlob = (options === null || options === void 0 ? void 0 : options.contentType)
|
|
1327
|
+
? new Blob([buf], { type: options.contentType })
|
|
1328
|
+
: buf;
|
|
1321
1329
|
if (method === 'base64') {
|
|
1322
|
-
return blobToBase64(
|
|
1330
|
+
return blobToBase64(actualBlob);
|
|
1323
1331
|
}
|
|
1324
|
-
return URL.createObjectURL(
|
|
1332
|
+
return URL.createObjectURL(actualBlob);
|
|
1325
1333
|
})
|
|
1326
1334
|
.then((url) => {
|
|
1327
1335
|
if (canceled) {
|
|
@@ -4736,14 +4744,6 @@ const VideoForwardingFunction = (props, ref) => {
|
|
|
4736
4744
|
const onDuration = useCallback((src, durationInSeconds) => {
|
|
4737
4745
|
setDurations({ type: 'got-duration', durationInSeconds, src });
|
|
4738
4746
|
}, [setDurations]);
|
|
4739
|
-
useEffect(() => {
|
|
4740
|
-
const interval = setInterval(() => {
|
|
4741
|
-
console.log('event loop still running');
|
|
4742
|
-
}, 2000);
|
|
4743
|
-
return () => {
|
|
4744
|
-
clearInterval(interval);
|
|
4745
|
-
};
|
|
4746
|
-
}, []);
|
|
4747
4747
|
if (loop && props.src && durations[getAbsoluteSrc(props.src)] !== undefined) {
|
|
4748
4748
|
const mediaDuration = durations[getAbsoluteSrc(props.src)] * fps;
|
|
4749
4749
|
return (jsx(Loop, { durationInFrames: calculateLoopDuration({
|
|
@@ -4761,7 +4761,6 @@ const VideoForwardingFunction = (props, ref) => {
|
|
|
4761
4761
|
}
|
|
4762
4762
|
validateMediaProps(props, 'Video');
|
|
4763
4763
|
if (environment.isRendering) {
|
|
4764
|
-
console.log('rendering');
|
|
4765
4764
|
return (jsx(VideoForRendering, { onDuration: onDuration, ...otherProps, ref: ref }));
|
|
4766
4765
|
}
|
|
4767
4766
|
return (jsx(VideoForDevelopment, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref, onDuration: onDuration }));
|
package/dist/esm/version.mjs
CHANGED