Issue
I am working on an Expo app and I use the component from expo-av. When I source the video from my assets, it works. But when I try to display a video which is stored on my Django server, it is not loading.
here is my code
<Video
style={{width: window.width * .93, height: window.width * .93 * 1.05,}}
source={{uri: server + "media/" + media.uri}}
shouldPlay
usePoster
/>
When I do the url on http request, I get the video I want. But it is not working on the expo app. How can I fix this?
Solution
It's possible that server + "media/" + media.uri
resolve in a relative URI - path/to/file.mp4
which not intended URI.
An absolute URI - https://your-domain.com/path/to/video.mp4
is required to stream video from server.
Answered By - Fiston Emmanuel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.