TheWidlarzGroup / react-native-video

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

[BUG]: HLS Format ts or m3u8 is not working in IOS and its showing an error #4199

Open BilalHadid opened 1 month ago

BilalHadid commented 1 month ago

Version

6.4.3

What platforms are you having the problem on?

iOS

System Version

18.1

On what device are you experiencing the issue?

Real device, Simulator

Architecture

New architecture with interop layer

What happened?

I am using react native video for m3u8 and TS format videos but its not working and showing an Error I even tried the same video in VLC Player so its working

Reproduction Link

repository link

Reproduction

Step to reproduce this bug are:

github-actions[bot] commented 1 month ago

Thank you for your issue report. Please note that the following information is missing or incomplete:

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 6.4.3, while the latest stable version is 6.6.2. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

Usman-02501 commented 1 month ago

+1

freeboub commented 1 month ago

more information needed ... a stream for exemple as it works with the sample app of the repository ...

ChadyAyoub4 commented 1 month ago

This issue started appearing after updating to Xcode 16. I do not have new architecture enabled

freeboub commented 1 month ago

describe the error please ?

ChadyAyoub4 commented 1 month ago

@freeboub the player fires the onError event and returns this error object: {"error": {"code": -12865, "domain": "CoreMediaErrorDomain", "localizedDescription": "The operation couldn’t be completed. (CoreMediaErrorDomain error -12865.)", "localizedFailureReason": "", "localizedRecoverySuggestion": ""}, "target": 13367}

BilalHadid commented 1 month ago

@freeboub {"error": {"code": -11850, "domain": "AVFoundationErrorDomain", "localizedDescription": "Operation Stopped", "localizedFailureReason": "The server is not correctly configured.", "localizedRecoverySuggestion": ""}, "target": 3657}

I've updated my React Native video package, but I'm still encountering the same error. Here's a sample URL for you to test in VLC Player. It works fine in VLC but not in the React Native Video iOS app. https://cfsystems.io/live/jakefromsf/F6WG7rDC6J/4727.ts https://cfsystems.io/live/jakefromsf/F6WG7rDC6J/4727.m3u8

It's working perfectly in Android @freeboub

ChadyAyoub4 commented 1 month ago

In Xcode it shows this Error whenever an hls link does not work: Error occurred: The operation couldn’t be completed. (OSStatus error -50.). According to this site It could mean a lot of different things, but its still weird that it only happens when building from xcode 16 and not from older versions using the same m3u8 link

ChadyAyoub4 commented 1 month ago

@freeboub I found out the root cause for the issue i was facing, turns out, if the app is build on xcode 16, or the ios version is ios 18, for some reason if the link to the video contains a space, for exampl www.linkToVideo/The+batman.m3u8, the link will not work and it will throw an error, if we upload the same file but the file name is theBatman instead of The Batman it will work.

MohitNarkhede commented 1 week ago

+1