Open TajwarSaiyeed opened 5 months ago
Hey! I faced the same issue 2 days ago.... The reason is the videos in vimeo provided in the tutorial are not supported by the tag. I inserted a hardcoded video just for testing and it is working fine.... Here you can check it too: https://www.w3schools.com/html/mov_bbb.mp4
Change the video links in your database or in the code, eitherway it will work.
I got the same error: but, when i put directly an mp4 video it works: <Video source={{ uri: "https://www.w3schools.com/html/mov_bbb.mp4" }} className="w-52 h-72 rounded-[33px] mt-3 bg-white/10" resizeMode={ResizeMode.CONTAIN} useNativeControls shouldPlay onPlaybackStatusUpdate={(status) => { console.log("playing",status.error); if(status.error){ Alert.alert("Error","An error occurred when playing the video") setPlay(false) } if (status.didJustFinish) { setPlay(false); } }} onError={(error) => { console.log("Video Error: ", error); setPlay(false); }} />
So the vimeo videos are not supported now? i tryed to use: https://player.vimeo.com/video/949579770?h=897cd5e781 and https://vimeo.com/949579770 i got the same error:
LOG Video Error: md.w0: None of the available extractors (c, d, b, g, k, b, a0, d, h0, e, h, b, e, f, b, a) could read the stream. LOG playing md.w0: None of the available extractors (c, d, b, g, k, b, a0, d, h0, e, h, b, e, f, b, a) could read the stream.
Video link that you are using to play does not ends with .mp4
. So <Video/>
component cannot play this, you should either use a link that ends with .mp4
or use react-native-webview
library to play this type of videos.
When using Vimeo video URLs, a 401 Unauthorized
error appears
Videos without .mp
extensions and public work correctly with the headers
specified below
<Video
source={{
uri: item.video,
headers: {
"User-Agent":
"Mozilla/5.0 (Linux; Android 13; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Mobile Safari/537.36",
Accept: "*/*",
"Accept-Language": "en-US,en;q=0.9",
"Accept-Encoding": "gzip, deflate",
Connection: "keep-alive",
},
}}
style={{
width: 208,
height: 288,
borderRadius: 35,
marginTop: 12,
backgroundColor: "#000",
}}
resizeMode={ResizeMode.CONTAIN}
useNativeControls
shouldPlay
onPlaybackStatusUpdate={(status) => {
if (status.didJustFinish) setPlay(false);
}}
/>
can anyone help me to fix this error?