razorRun / react-native-vlc-media-player

React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
https://roshan.digital/
MIT License
348 stars 183 forks source link

Not able to stream RTSP on IOS. EXC_BAD_ACCESS when run #208

Open CVHOANG-coder opened 2 months ago

CVHOANG-coder commented 2 months ago

I am trying to live stream using RTSP, the url is wokring fine in the actual media player but it's not working and show error: EXC_BAD_ACCESS when trying to stream it using VLCPlayer. Both simulator and real device

image

GustavoBonfimS commented 1 month ago

any solution ?

GustavoBonfimS commented 1 month ago

I faced this issue building in an Mac M1. The app crashes on simulator but works fine in real device. The temporary solution for me was building with different arch using: yarn ios --simulator "iPhone 15" --destination arch=x86_64

maddisonbruckelmyer01 commented 4 weeks ago

I'm facing this error as well, is there any more solutions to it?

CVHOANG-coder commented 4 weeks ago

replace special symbol in url path. Example '@' to '%40'. valid url : encodeURI(), encodeURIComponent(). I fix it

maddisonbruckelmyer01 commented 4 weeks ago

That doesn't seem to work for me

hakanakin commented 2 weeks ago

I faced this issue building in an Mac M1. The app crashes on simulator but works fine in real device. The temporary solution for me was building with different arch using: yarn ios --simulator "iPhone 15" --destination arch=x86_64

npx react-native run-ios --simulator="iPhone 15 Pro" --destination arch=x86_64 that's work for me to thx

tunm1228 commented 2 weeks ago

replace special symbol in url path. Example '@' to '%40'. valid url : encodeURI(), encodeURIComponent(). I fix it

Thank, I used it and it stopped crashing

roshansinghg commented 1 week ago

valid url : encodeURI(),

where to do this??

tunm1228 commented 1 week ago

encodeURIComponent

If your account or password contains special characters, use encodeURIComponent

roshansinghg commented 1 week ago

replace special symbol in url path. Example '@' to '%40'. valid url : encodeURI(), encodeURIComponent(). I fix it

I am just getting rtmp live streaming link from backend like uri: "rtmp://a704d90f9059140b6aa1bc1e9a918f45-1788519902.ap-south-1.elb.amazonaws.com:1935/live/4db23812-6918-49ef-80ee-d02e64d6a6fb", working fine for iOS 17.2 and lower but crashing above that.

tunm1228 commented 1 week ago

replace special symbol in url path. Example '@' to '%40'. valid url : encodeURI(), encodeURIComponent(). I fix it

I am just getting rtmp live streaming link from backend like uri: "rtmp://a704d90f9059140b6aa1bc1e9a918f45-1788519902.ap-south-1.elb.amazonaws.com:1935/live/4db23812-6918-49ef-80ee-d02e64d6a6fb", working fine for iOS 17.2 and lower but crashing above that.

Your path has no special characters, so this is not the case I encountered.Please learn more.

diegods-ferreira commented 1 week ago

I'm facing the same problem. Enconding the URL as @tunm1228 sugested did not work for me. The app stops crashing but the player is not able to play the video. My RTSP camera stream URL is "rtsp://admin:econdos123@192.168.1.123:554/Streaming/channels/101".

I've created a sample repository with the problem occurring: https://github.com/diegods-ferreira/react-native-vlc-media-player-ios-crashing

fredrikburmester commented 1 week ago

I'm trying to stream HLS and I get the same crash.

hakanakin commented 3 days ago

Hey, if you’re using<TouchableWithoutFeedback></TouchableWithoutFeedback> and your app crashes, you should replace it with a different option.

fredrikburmester commented 2 days ago

I can say that I'm not using TouchableWithoutFeedback and it is still crashing for me.

diegods-ferreira commented 12 hours ago

I was able to solve my problem with RTSP streaming. It turns out I had to request for Apple's Multicast Networking Entitlement permission so my app could stream. Apparently this had been going since iOS 17 and I just now realised. But once I got permission for multicast networking my app stopped crashing.

For anyone who wants to know how to request this permission, here it is: https://forums.developer.apple.com/forums/thread/663271?answerId=639455022#639455022