Commit cf226be 1 parent 391fb9a commit cf226be Copy full SHA for cf226be
File tree 2 files changed +6
-9
lines changed
package/src/external/reanimated
2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { useEffect } from "react" ;
2
- import { type FrameInfo , type SharedValue } from "react-native-reanimated" ;
2
+ import type { FrameInfo , SharedValue } from "react-native-reanimated" ;
3
3
4
4
import { useAnimatedImage } from "../../skia/core/AnimatedImage" ;
5
5
import type { DataSourceParam , SkImage } from "../../skia/types" ;
Original file line number Diff line number Diff line change 1
1
import { useEffect , useState } from "react" ;
2
- import {
3
- createWorkletRuntime ,
4
- runOnJS ,
5
- runOnRuntime ,
6
- } from "react-native-reanimated" ;
7
2
8
3
import type { Video } from "../../skia/types" ;
9
4
import { Skia } from "../../skia" ;
10
5
11
- const runtime = createWorkletRuntime ( "video-metadata-runtime" ) ;
6
+ import Rea from "./ReanimatedProxy" ;
7
+
8
+ const runtime = Rea . createWorkletRuntime ( "video-metadata-runtime" ) ;
12
9
13
10
type VideoSource = string | null ;
14
11
@@ -17,11 +14,11 @@ export const useVideoLoading = (source: VideoSource) => {
17
14
const cb = ( src : string ) => {
18
15
"worklet" ;
19
16
const vid = Skia . Video ( src ) as Video ;
20
- runOnJS ( setVideo ) ( vid ) ;
17
+ Rea . runOnJS ( setVideo ) ( vid ) ;
21
18
} ;
22
19
useEffect ( ( ) => {
23
20
if ( source ) {
24
- runOnRuntime ( runtime , cb ) ( source ) ;
21
+ Rea . runOnRuntime ( runtime , cb ) ( source ) ;
25
22
}
26
23
} , [ source ] ) ;
27
24
return video ;
You can’t perform that action at this time.
0 commit comments