0

Hi I'm working on a react-native and I want to display a video, using expo-av, a django FileField uri, here's my code:

  <Video
    source={{ uri: "my/django/HE7sU4ABuNRAvwpFfW3qME.MP4" }}
    onError={(e) => {
      console.log(e);
    }}
  />

Now the problem is that if I try to load a video using uri for django FileField video the following error occurs:

The server is not correctly configured. - The AVPlayerItem instance has failed with the error code -11850 and domain "AVFoundationErrorDomain".

How can I configure django to allow video displaying in react-native?

PietroPutelli
  • 482
  • 4
  • 20

1 Answers1

1

You're using relative URI which is not what expected by VideoPlayer. You need absolute URI like http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

Fiston Emmanuel
  • 4,242
  • 1
  • 8
  • 14