react-native-rtmp-publisher
react-native-rtmp-publisher copied to clipboard
Unable to start a second RTMP stream on iOS
The very first time works fine, but stopping the stream and starting a new one will crash. This is happening only on iOS.
To Reproduce
- Run .startStream()
- Stream works
- Run .stopStream()
- Run .startStream() again
- Stream won't start. RTMP client is not able to proceed the connection after the handshake.
Expected behavior Should start a new stream every time I run startStream.
Smartphone:
- Device: iPhone 13 and iPhone 11
- OS: both with iOS 16.1
- react-native-rtmp-publisher: 0.4.4
Additional context apiVideo uses HaishinKit 1.3.0 and works as expected, maybe this is an issue that comes from 1.2.7.
I tried to fork it and upgrade the package, but I've never worked with Xcode before and I'm kinda lost
I'll be looking at it soon 👍🏻
Maybe this thing happens because stream.attachCamera(nil)/stream.attachAudio(nil) is never called, removeFromSuperview could be a great place to write those lines. I tried to build it a couple of times but XCode is always throwing the build with a lot of errors from HaishinKit
@izquiratops I'm currently updating the HaishinKit to 1.4.1 but there is a problem about the process. I've created an issue about it on here
I'm working about it
I was wondering if there are any updates on this.
Used suggested @izquiratops changes to fix that. Also updated haishinkit to 1.4.3
https://github.com/ezranbayantemur/react-native-rtmp-publisher/pull/38