react-native-rtmp-publisher icon indicating copy to clipboard operation
react-native-rtmp-publisher copied to clipboard

Unable to start a second RTMP stream on iOS

Open izquiratops opened this issue 2 years ago • 5 comments

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

  1. Run .startStream()
  2. Stream works
  3. Run .stopStream()
  4. Run .startStream() again
  5. 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

izquiratops avatar Nov 25 '22 14:11 izquiratops

I'll be looking at it soon 👍🏻

ezranbayantemur avatar Dec 01 '22 14:12 ezranbayantemur

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 avatar Dec 04 '22 21:12 izquiratops

@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

ezranbayantemur avatar Jan 06 '23 22:01 ezranbayantemur

I was wondering if there are any updates on this.

turkmenkaan avatar Jan 25 '23 03:01 turkmenkaan

Used suggested @izquiratops changes to fix that. Also updated haishinkit to 1.4.3

https://github.com/ezranbayantemur/react-native-rtmp-publisher/pull/38

Andriiklymiuk avatar Apr 11 '23 14:04 Andriiklymiuk