1

I'm working on a react-native app witch contains some videos, and when I put in source the uri: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4', from google samples, it actually works, but if I try to put a uri for a video contained in my django media folder, the following error occur: The server is not correctly configured. - The AVPlayerItem instance has failed with the error code -11850 and domain "AVFoundationErrorDomain".

How can I solve? Thank you

1 Answers1

0

This is because AVFoundation is using byte range requests which is not supported by Django out of the box.

Add this to your middleware: https://github.com/AidenEllis/DjangoRangeMiddleware

Related: Byte Ranges in Django

pfcodes
  • 1,055
  • 2
  • 9
  • 15