File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
package/src/external/reanimated Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 11import { useEffect } from "react" ;
2- import { type FrameInfo , type SharedValue } from "react-native-reanimated" ;
2+ import type { FrameInfo , SharedValue } from "react-native-reanimated" ;
33
44import { useAnimatedImage } from "../../skia/core/AnimatedImage" ;
55import type { DataSourceParam , SkImage } from "../../skia/types" ;
Original file line number Diff line number Diff line change 11import { useEffect , useState } from "react" ;
2- import {
3- createWorkletRuntime ,
4- runOnJS ,
5- runOnRuntime ,
6- } from "react-native-reanimated" ;
72
83import type { Video } from "../../skia/types" ;
94import { Skia } from "../../skia" ;
105
11- const runtime = createWorkletRuntime ( "video-metadata-runtime" ) ;
6+ import Rea from "./ReanimatedProxy" ;
7+
8+ const runtime = Rea . createWorkletRuntime ( "video-metadata-runtime" ) ;
129
1310type VideoSource = string | null ;
1411
@@ -17,11 +14,11 @@ export const useVideoLoading = (source: VideoSource) => {
1714 const cb = ( src : string ) => {
1815 "worklet" ;
1916 const vid = Skia . Video ( src ) as Video ;
20- runOnJS ( setVideo ) ( vid ) ;
17+ Rea . runOnJS ( setVideo ) ( vid ) ;
2118 } ;
2219 useEffect ( ( ) => {
2320 if ( source ) {
24- runOnRuntime ( runtime , cb ) ( source ) ;
21+ Rea . runOnRuntime ( runtime , cb ) ( source ) ;
2522 }
2623 } , [ source ] ) ;
2724 return video ;
You can’t perform that action at this time.
0 commit comments