adrianhajdin / aora

Build your first mobile application
https://jsmastery.pro
2.02k stars 373 forks source link

Video playback error: db.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. #28

Open TajwarSaiyeed opened 5 months ago

TajwarSaiyeed commented 5 months ago

WhatsApp Image 2024-06-07 at 11 42 54_95a084e2

image

can anyone help me to fix this error?

Lagnajit09 commented 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

Change the video links in your database or in the code, eitherway it will work.

ingacrd commented 3 months ago

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.

sriom-sharan commented 3 months ago

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.

Abdelaziz79 commented 1 month ago

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);
  }}
/>