@react-native-ohos/react-native-skia 1.3.10 → 1.3.11

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,147 +0,0 @@
1
- import { useEffect, useMemo } from "react";
2
- import { Platform } from "@shopify/react-native-skia/src/Platform/Platform";
3
- import Rea from "@shopify/react-native-skia/src/external/reanimated/ReanimatedProxy";
4
- import { useVideoLoading } from "@shopify/react-native-skia/src/external/reanimated/useVideoLoading";
5
- export const currentSKImageFrames = [];
6
- const copyFrameOnAndroid = currentFrame => {
7
- "worklet";
8
-
9
- // on android we need to copy the texture before it's invalidated
10
- if (Platform.OS === "android" || Platform.OS === "harmony") {
11
- const tex = currentFrame.value;
12
- if (tex) {
13
- currentFrame.value = tex.makeNonTextureImage();
14
- //currentSKImageFrames.push(currentFrame.value);
15
- //console.log("push OK");
16
- tex.dispose();
17
- }
18
- }
19
- };
20
- const setFrame = (video, currentFrame) => {
21
- "worklet";
22
-
23
- console.log("nextImage");
24
- const img = video.nextImage();
25
- if (img) {
26
- if (currentFrame.value) {
27
- currentFrame.value.dispose();
28
- }
29
- currentFrame.value = img;
30
- copyFrameOnAndroid(currentFrame);
31
- }
32
- };
33
- const defaultOptions = {
34
- looping: true,
35
- paused: false,
36
- seek: null,
37
- currentTime: 0,
38
- volume: 0
39
- };
40
- const useOption = value => {
41
- "worklet";
42
-
43
- // TODO: only create defaultValue is needed (via makeMutable)
44
- const defaultValue = Rea.useSharedValue(Rea.isSharedValue(value) ? value.value : value);
45
- return Rea.isSharedValue(value) ? value : defaultValue;
46
- };
47
- const disposeVideo = video => {
48
- "worklet";
49
-
50
- video === null || video === void 0 || video.dispose();
51
- };
52
- export const useVideo = (source, userOptions) => {
53
- var _userOptions$paused, _userOptions$looping, _userOptions$seek, _userOptions$volume;
54
- const video = useVideoLoading(source);
55
- const isPaused = useOption((_userOptions$paused = userOptions === null || userOptions === void 0 ? void 0 : userOptions.paused) !== null && _userOptions$paused !== void 0 ? _userOptions$paused : defaultOptions.paused);
56
- const looping = useOption((_userOptions$looping = userOptions === null || userOptions === void 0 ? void 0 : userOptions.looping) !== null && _userOptions$looping !== void 0 ? _userOptions$looping : defaultOptions.looping);
57
- const seek = useOption((_userOptions$seek = userOptions === null || userOptions === void 0 ? void 0 : userOptions.seek) !== null && _userOptions$seek !== void 0 ? _userOptions$seek : defaultOptions.seek);
58
- const volume = useOption((_userOptions$volume = userOptions === null || userOptions === void 0 ? void 0 : userOptions.volume) !== null && _userOptions$volume !== void 0 ? _userOptions$volume : defaultOptions.volume);
59
- const currentFrame = Rea.useSharedValue(null);
60
- const currentTime = Rea.useSharedValue(0);
61
- const lastTimestamp = Rea.useSharedValue(-1);
62
- const duration = useMemo(() => {
63
- var _video$duration;
64
- return (_video$duration = video === null || video === void 0 ? void 0 : video.duration()) !== null && _video$duration !== void 0 ? _video$duration : 0;
65
- }, [video]);
66
- const framerate = useMemo(() => {
67
- var _video$framerate;
68
- return Platform.OS === "web" ? -1 : (_video$framerate = video === null || video === void 0 ? void 0 : video.framerate()) !== null && _video$framerate !== void 0 ? _video$framerate : 0;
69
- }, [video]);
70
- const size = useMemo(() => {
71
- var _video$size;
72
- return (_video$size = video === null || video === void 0 ? void 0 : video.size()) !== null && _video$size !== void 0 ? _video$size : {
73
- width: 0,
74
- height: 0
75
- };
76
- }, [video]);
77
- const rotation = useMemo(() => {
78
- var _video$rotation;
79
- return (_video$rotation = video === null || video === void 0 ? void 0 : video.rotation()) !== null && _video$rotation !== void 0 ? _video$rotation : 0;
80
- }, [video]);
81
- const frameDuration = 1000 / framerate;
82
- const currentFrameDuration = Math.floor(frameDuration);
83
- Rea.useAnimatedReaction(() => isPaused.value, paused => {
84
- if (paused) {
85
- video === null || video === void 0 || video.pause();
86
- } else {
87
- lastTimestamp.value = -1;
88
- video === null || video === void 0 || video.play();
89
- }
90
- });
91
- Rea.useAnimatedReaction(() => seek.value, value => {
92
- if (value !== null) {
93
- video === null || video === void 0 || video.seek(value);
94
- currentTime.value = value;
95
- seek.value = null;
96
- }
97
- });
98
- Rea.useAnimatedReaction(() => volume.value, value => {
99
- video === null || video === void 0 || video.setVolume(value);
100
- });
101
- Rea.useFrameCallback(async frameInfo => {
102
- "worklet";
103
-
104
- if (!video) {
105
- return;
106
- }
107
- if (isPaused.value) {
108
- return;
109
- }
110
- const currentTimestamp = frameInfo.timestamp;
111
- if (lastTimestamp.value === -1) {
112
- lastTimestamp.value = currentTimestamp;
113
- }
114
- const delta = currentTimestamp - lastTimestamp.value;
115
- const isOver = currentTime.value + delta > duration;
116
- if (isOver && looping.value) {
117
- console.log("in if seek");
118
- seek.value = 0;
119
- currentTime.value = seek.value;
120
- lastTimestamp.value = currentTimestamp;
121
- }
122
- // On Web the framerate is uknown.
123
- // This could be optimized by using requestVideoFrameCallback (Chrome only)
124
-
125
- if (delta > currentFrameDuration * 3 && !isOver || Platform.OS === "web") {
126
- //console.log(`当前时间:${currentTime.value},时间间隔:${delta},当前帧持续时间:${currentFrameDuration}`)
127
- setFrame(video, currentFrame);
128
- currentTime.value += delta;
129
- lastTimestamp.value = currentTimestamp;
130
- }
131
- });
132
- useEffect(() => {
133
- return () => {
134
- // TODO: should video simply be a shared value instead?
135
- Rea.runOnUI(disposeVideo)(video);
136
- };
137
- }, [video]);
138
- return {
139
- currentFrame,
140
- currentTime,
141
- duration,
142
- framerate,
143
- rotation,
144
- size
145
- };
146
- };
147
- //# sourceMappingURL=useVideo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useMemo","Platform","Rea","useVideoLoading","currentSKImageFrames","copyFrameOnAndroid","currentFrame","OS","tex","value","makeNonTextureImage","dispose","setFrame","video","console","log","img","nextImage","defaultOptions","looping","paused","seek","currentTime","volume","useOption","defaultValue","useSharedValue","isSharedValue","disposeVideo","useVideo","source","userOptions","_userOptions$paused","_userOptions$looping","_userOptions$seek","_userOptions$volume","isPaused","lastTimestamp","duration","_video$duration","framerate","_video$framerate","size","_video$size","width","height","rotation","_video$rotation","frameDuration","currentFrameDuration","Math","floor","useAnimatedReaction","pause","play","setVolume","useFrameCallback","frameInfo","currentTimestamp","timestamp","delta","isOver","runOnUI"],"sources":["useVideo.ts"],"sourcesContent":["import type { SharedValue, FrameInfo } from \"react-native-reanimated\";\r\nimport { useEffect, useMemo } from \"react\";\r\n\r\nimport type { SkImage, Video } from \"@shopify/react-native-skia\";\r\nimport { Platform } from \"@shopify/react-native-skia/src/Platform/Platform\";\r\n\r\nimport Rea from \"@shopify/react-native-skia/src/external/reanimated/ReanimatedProxy\";\r\nimport { useVideoLoading } from \"@shopify/react-native-skia/src/external/reanimated/useVideoLoading\";\r\n\r\ntype Animated<T> = SharedValue<T> | T;\r\n\r\ninterface PlaybackOptions {\r\n looping: Animated<boolean>;\r\n paused: Animated<boolean>;\r\n seek: Animated<number | null>;\r\n volume: Animated<number>;\r\n}\r\n\r\nexport const currentSKImageFrames: SkImage[] = [];\r\n\r\nconst copyFrameOnAndroid = (currentFrame: SharedValue<SkImage | null>) => {\r\n \"worklet\";\r\n // on android we need to copy the texture before it's invalidated\r\n if (Platform.OS === \"android\" || Platform.OS === \"harmony\") {\r\n const tex = currentFrame.value;\r\n if (tex) {\r\n currentFrame.value = tex.makeNonTextureImage();\r\n //currentSKImageFrames.push(currentFrame.value);\r\n //console.log(\"push OK\");\r\n tex.dispose();\r\n }\r\n }\r\n};\r\n\r\nconst setFrame = (video: Video, currentFrame: SharedValue<SkImage | null>) => {\r\n \"worklet\";\r\n console.log(\"nextImage\");\r\n const img = video.nextImage();\r\n if (img) {\r\n if (currentFrame.value) {\r\n currentFrame.value.dispose();\r\n }\r\n currentFrame.value = img;\r\n copyFrameOnAndroid(currentFrame);\r\n }\r\n};\r\n\r\nconst defaultOptions = {\r\n looping: true,\r\n paused: false,\r\n seek: null,\r\n currentTime: 0,\r\n volume: 0,\r\n};\r\n\r\nconst useOption = <T>(value: Animated<T>) => {\r\n \"worklet\";\r\n // TODO: only create defaultValue is needed (via makeMutable)\r\n const defaultValue = Rea.useSharedValue(\r\n Rea.isSharedValue(value) ? value.value : value\r\n );\r\n return Rea.isSharedValue(value) ? value : defaultValue;\r\n};\r\n\r\nconst disposeVideo = (video: Video | null) => {\r\n \"worklet\";\r\n\r\n video?.dispose();\r\n};\r\n\r\nexport const useVideo = (\r\n source: string | null,\r\n userOptions?: Partial<PlaybackOptions>\r\n) => {\r\n const video = useVideoLoading(source);\r\n const isPaused = useOption(userOptions?.paused ?? defaultOptions.paused);\r\n const looping = useOption(userOptions?.looping ?? defaultOptions.looping);\r\n const seek = useOption(userOptions?.seek ?? defaultOptions.seek);\r\n const volume = useOption(userOptions?.volume ?? defaultOptions.volume);\r\n const currentFrame = Rea.useSharedValue<null | SkImage>(null);\r\n const currentTime = Rea.useSharedValue(0);\r\n const lastTimestamp = Rea.useSharedValue(-1);\r\n const duration = useMemo(() => video?.duration() ?? 0, [video]);\r\n const framerate = useMemo(\r\n () => (Platform.OS === \"web\" ? -1 : video?.framerate() ?? 0),\r\n [video]\r\n );\r\n const size = useMemo(() => video?.size() ?? { width: 0, height: 0 }, [video]);\r\n const rotation = useMemo(() => video?.rotation() ?? 0, [video]);\r\n const frameDuration = 1000 / framerate;\r\n const currentFrameDuration = Math.floor(frameDuration);\r\n Rea.useAnimatedReaction(\r\n () => isPaused.value,\r\n (paused) => {\r\n if (paused) {\r\n video?.pause();\r\n } else {\r\n lastTimestamp.value = -1;\r\n video?.play();\r\n }\r\n }\r\n );\r\n Rea.useAnimatedReaction(\r\n () => seek.value,\r\n (value) => {\r\n if (value !== null) {\r\n video?.seek(value);\r\n currentTime.value = value;\r\n seek.value = null;\r\n }\r\n }\r\n );\r\n Rea.useAnimatedReaction(\r\n () => volume.value,\r\n (value) => {\r\n video?.setVolume(value);\r\n }\r\n );\r\n\r\n Rea.useFrameCallback(async (frameInfo: FrameInfo) => {\r\n \"worklet\";\r\n if (!video) {\r\n return;\r\n }\r\n if (isPaused.value) {\r\n return;\r\n }\r\n const currentTimestamp = frameInfo.timestamp;\r\n if (lastTimestamp.value === -1) {\r\n lastTimestamp.value = currentTimestamp;\r\n }\r\n const delta = currentTimestamp - lastTimestamp.value;\r\n const isOver = currentTime.value + delta > duration;\r\n\r\n if (isOver && looping.value) {\r\n console.log(\"in if seek\");\r\n seek.value = 0;\r\n currentTime.value = seek.value;\r\n lastTimestamp.value = currentTimestamp;\r\n }\r\n // On Web the framerate is uknown.\r\n // This could be optimized by using requestVideoFrameCallback (Chrome only)\r\n\r\n if (\r\n (delta > currentFrameDuration * 3 && !isOver) ||\r\n Platform.OS === \"web\"\r\n ) {\r\n //console.log(`当前时间:${currentTime.value},时间间隔:${delta},当前帧持续时间:${currentFrameDuration}`)\r\n setFrame(video, currentFrame);\r\n currentTime.value += delta;\r\n lastTimestamp.value = currentTimestamp;\r\n }\r\n });\r\n\r\n useEffect(() => {\r\n return () => {\r\n // TODO: should video simply be a shared value instead?\r\n Rea.runOnUI(disposeVideo)(video);\r\n };\r\n }, [video]);\r\n\r\n return {\r\n currentFrame,\r\n currentTime,\r\n duration,\r\n framerate,\r\n rotation,\r\n size,\r\n };\r\n};\r\n"],"mappings":"AACA,SAASA,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAG1C,SAASC,QAAQ,QAAQ,kDAAkD;AAE3E,OAAOC,GAAG,MAAM,oEAAoE;AACpF,SAASC,eAAe,QAAQ,oEAAoE;AAWpG,OAAO,MAAMC,oBAA+B,GAAG,EAAE;AAEjD,MAAMC,kBAAkB,GAAIC,YAAyC,IAAK;EACxE,SAAS;;EACT;EACA,IAAIL,QAAQ,CAACM,EAAE,KAAK,SAAS,IAAIN,QAAQ,CAACM,EAAE,KAAK,SAAS,EAAE;IAC1D,MAAMC,GAAG,GAAGF,YAAY,CAACG,KAAK;IAC9B,IAAID,GAAG,EAAE;MACPF,YAAY,CAACG,KAAK,GAAGD,GAAG,CAACE,mBAAmB,CAAC,CAAC;MAC9C;MACA;MACAF,GAAG,CAACG,OAAO,CAAC,CAAC;IACf;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AG,GAAG,CAAC4D,OAAO,CAAClC,YAAY,CAAC,CAACf,KAAK,CAAC;IAClC,CAAC;EACH,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,OAAO;IACLP,YAAY;IACZgB,WAAW;IACXgB,QAAQ;IACRE,SAAS;IACTM,QAAQ;IACRJ;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- import "@shopify/react-native-skia/src/skia/NativeSetup";
2
- export { JsiSkImage } from "@shopify/react-native-skia";
3
- export * from "@shopify/react-native-skia";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["JsiSkImage"],"sources":["index.ts"],"sourcesContent":["import \"@shopify/react-native-skia/src/skia/NativeSetup\";\r\nexport { JsiSkImage } from \"@shopify/react-native-skia\";\r\nexport * from \"@shopify/react-native-skia\";\r\n"],"mappings":"AAAA,OAAO,iDAAiD;AACxD,SAASA,UAAU,QAAQ,4BAA4B;AACvD,cAAc,4BAA4B","ignoreList":[]}
@@ -1 +0,0 @@
1
- export * from "./src";
@@ -1,5 +0,0 @@
1
- declare const SkiaEnvironment_base: typeof import("jest-environment-node").default;
2
- export default class SkiaEnvironment extends SkiaEnvironment_base {
3
- constructor(config: any, context: any);
4
- }
5
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import type { SharedValue } from "react-native-reanimated";
2
- import type { SkImage } from "@shopify/react-native-skia";
3
- type Animated<T> = SharedValue<T> | T;
4
- interface PlaybackOptions {
5
- looping: Animated<boolean>;
6
- paused: Animated<boolean>;
7
- seek: Animated<number | null>;
8
- volume: Animated<number>;
9
- }
10
- export declare const currentSKImageFrames: SkImage[];
11
- export declare const useVideo: (source: string | null, userOptions?: Partial<PlaybackOptions>) => {
12
- currentFrame: SharedValue<SkImage | null>;
13
- currentTime: SharedValue<number>;
14
- duration: number;
15
- framerate: number;
16
- rotation: import("@shopify/react-native-skia/src/skia").VideoRotation;
17
- size: {
18
- width: number;
19
- height: number;
20
- };
21
- };
22
- export {};
@@ -1,3 +0,0 @@
1
- import "@shopify/react-native-skia/src/skia/NativeSetup";
2
- export { JsiSkImage } from "@shopify/react-native-skia";
3
- export * from "@shopify/react-native-skia";