TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://docs.thewidlarzgroup.com/react-native-video/
MIT License
7.21k stars 2.9k forks source link

DASH or HLS videos are not playing #3371

Closed manjunath-nuveb closed 11 months ago

manjunath-nuveb commented 12 months ago

Bug

DASH or HLS videos are not playing. in version 5.2.1 I get {"error": {"errorException": "com.google.android.exoplayer2.ExoPlaybackException: Source error", "errorString": "Unrecognized media format"}} and in 6.0.0-alpha.1 getting {"error": {"errorCode": "22001", "errorException": "com.google.android.exoplayer2.ExoPlaybackException: Source error", "errorStackTrace": "com.google.android.exoplayer2.ExoPlaybackException: Source error The video samples I tried are : https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8 https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd

Platform

Which player are you experiencing the problem on:

Environment info

"dependencies": { "react": "18.2.0", "react-native": "0.72.7", "react-native-video": "^5.2.1" },

Library version: 5.2.1 Device: Emulator

Steps To Reproduce

  1. Create new React native CLI project and install library
  2. use provided hls or dash URL <Video source={{ uri: "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8", }} style={{ height: 300, width: Dimensions.get('window').width, alignSelf: 'stretch', }} onError={a => console.log('error', a)} controls={true} />

Expected behaviour

1.Video should play for HLS or DASH URLS

Video sample

KrzysztofMoch commented 12 months ago

Hey @manjunath-nuveb, cloud you test if it appears in v6.0.0 ?

efstathiosntonas commented 11 months ago

If i try to play this in iOS simulator (iOS 17.0) on 6.0.0-beta.0:

 source={{
          uri: "https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd",
          type: "mpd"
        }}

throws:


{"error": 
       {"code": -11828, 
"domain": "AVFoundationErrorDomain", 
"localizedDescription": "Cannot Open", 
"localizedFailureReason": "This media format is not supported.", 
"localizedRecoverySuggestion": ""
  },
 "target": 5025
}

when I try:

 source={{
          uri: "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8"
        }}

it throws:


{"error":
 {
   "code": -12746,
 "domain": "CoreMediaErrorDomain",
 "localizedDescription": "The operation couldn’t be completed. (CoreMediaErrorDomain error -12746.)",
 "localizedFailureReason": "",
 "localizedRecoverySuggestion": ""
  },
 "target": 2535
}

when I try to play some of my remote .mp4 throws: (i believe it's an encoding issue of the files though)

{"error":
 {"code": -11800,
 "domain": "AVFoundationErrorDomain",
 "localizedDescription": "The operation could not be completed", 
"localizedFailureReason": "An unknown error occurred (-12746)",
 "localizedRecoverySuggestion": ""
}
, "target": 5025}

On Android 13 emulator all of the above load fine.

freeboub commented 11 months ago

Dash is not supported on ios first point closed. For the other issue, you need to check xcode logs to understand the issue better I think. Did you try with the sample in this repo ? It would be better to test on the V6 version also !

Jianlong-Nie commented 11 months ago

Same issue as above,i got this errors both on 5.2.1 and 6.0.0-beta.2 @freeboub image image and getLicense will never be called

{"error": {"code": 1718449215, "domain": "CoreMediaErrorDomain", "localizedDescription": "The operation couldn’t be completed. (CoreMediaErrorDomain error 1718449215.)", "localizedFailureReason": "", "localizedRecoverySuggestion": ""}, "target": 19343}

freeboub commented 11 months ago

@manjunath-nuveb I have just tested both video in sample app with V6.0.0 version, they work fine on my side (I just add to check my emulator date & time). @Jianlong-Nie This is a different issue. both video are clear, getLicense shall not be called. Let's close this issue, if you have more information on the issue let me know

manjunath-nuveb commented 7 months ago

hi @freeboub
with this url https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8 I'm getting the following in IOS only. Same URL works for android

{
  "error": {
    "localizedRecoverySuggestion": "",
    "domain": "NSURLErrorDomain",
    "localizedFailureReason": "",
    "localizedDescription": "resource unavailable",
    "code": -1008
  },
  "target": 19
}
manjunath-nuveb commented 7 months ago

@freeboub using https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8 in IOS video is showing a black screen. Again works fine on android

simulator_screenshot_B587516D-FFE9-4A8A-9A35-2F71C63DE01F

upgradrh commented 7 months ago

any fixes on this issue

ardneved commented 7 months ago

@freeboub any fixes on this issue ? when playing the live streaming source with '.m3u8' format I'm seeing the same issue on iOS side, Android works fine though "react-native-video": "6.0.0-beta.3", ...the issue is same on the latest beta build as well "6.0.0-beta.8"

{ target: 2513,
  error: 
   { localizedDescription: 'The operation couldn’t be completed. (CoreMediaErrorDomain error -12746.)',
     domain: 'CoreMediaErrorDomain',
     localizedFailureReason: '',
     localizedRecoverySuggestion: '',
     code: -12746 
   } 
}

Any updates on this would be really helpful.

freeboub commented 7 months ago

@ardneved do you reproduce it with the sample from the repository?