@remotion/gif 4.0.250 → 4.0.251
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/.turbo/turbo-make.log
CHANGED
|
@@ -4,6 +4,7 @@ exports.getGifDurationInSeconds = void 0;
|
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const gif_cache_1 = require("./gif-cache");
|
|
6
6
|
const react_tools_1 = require("./react-tools");
|
|
7
|
+
const resolve_gif_source_1 = require("./resolve-gif-source");
|
|
7
8
|
const calcDuration = (parsed) => {
|
|
8
9
|
return (parsed.delays.reduce((sum, delay) => sum + delay, 0) / 1000);
|
|
9
10
|
};
|
|
@@ -13,7 +14,7 @@ const calcDuration = (parsed) => {
|
|
|
13
14
|
*/
|
|
14
15
|
const getGifDurationInSeconds = async (src) => {
|
|
15
16
|
var _a;
|
|
16
|
-
const resolvedSrc =
|
|
17
|
+
const resolvedSrc = (0, resolve_gif_source_1.resolveGifSource)(src);
|
|
17
18
|
const inCache = (_a = gif_cache_1.volatileGifCache.get(resolvedSrc)) !== null && _a !== void 0 ? _a : gif_cache_1.manuallyManagedGifCache.get(resolvedSrc);
|
|
18
19
|
if (inCache) {
|
|
19
20
|
return calcDuration(inCache);
|
package/dist/esm/index.mjs
CHANGED
|
@@ -787,12 +787,20 @@ var parseWithWorker = (src2) => {
|
|
|
787
787
|
};
|
|
788
788
|
};
|
|
789
789
|
|
|
790
|
+
// src/resolve-gif-source.ts
|
|
791
|
+
var resolveGifSource = (src2) => {
|
|
792
|
+
if (typeof window === "undefined") {
|
|
793
|
+
return src2;
|
|
794
|
+
}
|
|
795
|
+
return new URL(src2, window.origin).href;
|
|
796
|
+
};
|
|
797
|
+
|
|
790
798
|
// src/get-gif-duration-in-seconds.ts
|
|
791
799
|
var calcDuration = (parsed) => {
|
|
792
800
|
return parsed.delays.reduce((sum, delay) => sum + delay, 0) / 1000;
|
|
793
801
|
};
|
|
794
802
|
var getGifDurationInSeconds = async (src2) => {
|
|
795
|
-
const resolvedSrc =
|
|
803
|
+
const resolvedSrc = resolveGifSource(src2);
|
|
796
804
|
const inCache = volatileGifCache.get(resolvedSrc) ?? manuallyManagedGifCache.get(resolvedSrc);
|
|
797
805
|
if (inCache) {
|
|
798
806
|
return calcDuration(inCache);
|
|
@@ -992,14 +1000,6 @@ var isCorsError = (error) => {
|
|
|
992
1000
|
return error.message.includes("Failed to fetch") || error.message.includes("Load failed") || error.message.includes("NetworkError when attempting to fetch resource");
|
|
993
1001
|
};
|
|
994
1002
|
|
|
995
|
-
// src/resolve-gif-source.ts
|
|
996
|
-
var resolveGifSource = (src2) => {
|
|
997
|
-
if (typeof window === "undefined") {
|
|
998
|
-
return src2;
|
|
999
|
-
}
|
|
1000
|
-
return new URL(src2, window.origin).href;
|
|
1001
|
-
};
|
|
1002
|
-
|
|
1003
1003
|
// src/useCurrentGifIndex.tsx
|
|
1004
1004
|
import { useMemo as useMemo2 } from "react";
|
|
1005
1005
|
import { useCurrentFrame, useVideoConfig } from "remotion";
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/gif"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/gif",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.251",
|
|
7
7
|
"description": "Embed GIFs in a Remotion video",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"bugs": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"remotion": "4.0.
|
|
27
|
+
"remotion": "4.0.251"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"esbuild": "0.24.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"react-dom": "19.0.0",
|
|
33
33
|
"webpack": "5.96.1",
|
|
34
34
|
"eslint": "9.14.0",
|
|
35
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
35
|
+
"@remotion/eslint-config-internal": "4.0.251"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": ">=16.8.0",
|