alantoa / expo-reanimated-av-player

A high-performance, interactive and customizable video player control, built upon Reanimated v2 & GestureHandler v2
MIT License
86 stars 12 forks source link

Tried to synchronously call anonymous function from a different thread #6

Closed avie41 closed 1 year ago

avie41 commented 1 year ago

Got this error while trying to implement the player. No idea about how to fix it...

image

  "dependencies": {
    "@babel/preset-env": "^7.1.6",
    "expo": "~47.0.12",
    "expo-av": "^13.0.2",
    "expo-screen-orientation": "^5.0.1",
    "expo-status-bar": "~1.4.2",
    "lottie-ios": "^3.4.0",
    "lottie-react-native": "^5.1.4",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-native": "0.70.5",
    "react-native-awesome-slider": "^2.3.0",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-reanimated": "~2.12.0",
    "react-native-safe-area-context": "^4.4.1",
    "react-native-web": "~0.18.9"
  }
avie41 commented 1 year ago

I found the error! Do not forget to add Reanimated's Babel plugin to your babel.config.js after having installed react-native-reanimated.

  module.exports = {
    presets: [
      ...
    ],
    plugins: [
      ...
      'react-native-reanimated/plugin',
    ],
  };