How to properly unload video in expo-av?

Please provide the following:

  1. SDK Version: expo@44.0.5
  2. Platforms(Android/iOS/web/all): all

Hi, I’m using expo-av to play videos on the app. So my video cycle goes like this.

  1. Scroll and video is viewable. videoRef.loadAsync
  2. Scroll and video is unviewable. videoRef.unloadAsync

So, sometimes in the emulator, the videos don’t load. I get the following error on onPlaybackStatusUpdate.

Object {
  "error": "Player error: null",
  "isLoaded": false,
}

So is the cycle correct loadAsync then unloadAsync. Or do I have to stop the video and then unload by first doing stopAsync and then unloadAsync?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.