Skip to content

Commit

Permalink
fix(🐎): Fix reanimated regression
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon committed Jun 14, 2024
1 parent 76ee745 commit 3be25d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions example/src/Examples/Video/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export const Video = () => {
/>
<ColorMatrix
matrix={[
0.95, 0, 0, 0, 0.05, 0.65, 0, 0, 0, 0.15, 0.15, 0, 0, 0, 0.5, 0,
0, 0, 1, 0,
-0.578, 0.99, 0.588, 0, 0, 0.469, 0.535, -0.003, 0, 0, 0.015,
1.69, -0.703, 0, 0, 0, 0, 0, 1, 0,
]}
/>
</Fill>
Expand Down
3 changes: 2 additions & 1 deletion package/src/external/reanimated/useVideoLoading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ const runtime = Rea.createWorkletRuntime("video-metadata-runtime");
type VideoSource = string | null;

export const useVideoLoading = (source: VideoSource) => {
const runOnJS = Rea.runOnJS;

Check failure on line 13 in package/src/external/reanimated/useVideoLoading.ts

View workflow job for this annotation

GitHub Actions / build (example)

Use object destructuring

Check failure on line 13 in package/src/external/reanimated/useVideoLoading.ts

View workflow job for this annotation

GitHub Actions / build (fabricexample)

Use object destructuring
const [video, setVideo] = useState<Video | null>(null);
const cb = (src: string) => {
"worklet";
const vid = Skia.Video(src) as Video;
Rea.runOnJS(setVideo)(vid);
runOnJS(setVideo)(vid);
};
useEffect(() => {
if (source) {
Expand Down

0 comments on commit 3be25d2

Please sign in to comment.