kraken.fm icon indicating copy to clipboard operation
kraken.fm copied to clipboard

Connection to Kraken API from React Native app

Open silentlight opened this issue 3 years ago • 8 comments

Hi there!

I have a problem connecting to Kraken API from RN app. It get's connected but then I get onTrackTimeout. It seems like initial connection between RN app and Kraken API is not established. What is weird is that if I start web app first and then make a connection to Kraken API it all works, so it seems that publish request does not make a connection?

My configuration is:

const configuration = {
      bundlePolicy: 'max-bundle',
      rtcpMuxPolicy: 'require',
      sdpSemantics: 'unified-plan'
    };

Any help would be appreciated :)

silentlight avatar May 16 '21 09:05 silentlight

Are you using rpc.kraken.fm or your own deployment?

cedricfung avatar May 16 '21 09:05 cedricfung

We are using our own deployment. Using demo web app it all works but if we use the same code converted to RN with react-native-webrtc it does not work :(

silentlight avatar May 16 '21 13:05 silentlight

You should configure proper iceServers option.

cedricfung avatar May 16 '21 13:05 cedricfung

Can I use rpc.kraken.fm to see if it works?

silentlight avatar May 16 '21 13:05 silentlight

When I use your server publish request gives me error: "TypeError: offer SDP semantics does not match configuration"

silentlight avatar May 16 '21 14:05 silentlight

I think it's because your RN app uses old browser, which doesn't support some webrtc feature.

cedricfung avatar May 16 '21 14:05 cedricfung

What is weird is that whenever someone is already in the room (using web app) and I connect using RN it all works. I can see my RN user on web app UI :/

silentlight avatar May 16 '21 15:05 silentlight

Maybe passing some options to createOffer will make it work?

silentlight avatar May 16 '21 15:05 silentlight