React native module does not work

Hello.

Problem: I am trying to start live streaming using ‘LivestreamView’ but seems not working. When I push start streaming button, I do not get any logs of succeeded, failed, and disconnected on android device(I have not tried on ios yet, by the way).

What I did: I could find my streaming json information correctly made in dashboard, but still live streaming player in dashboard says this streaming is not connected yet.

Question: Am I using this element wrong way? I got a camera permission before using this element for sure. Please help me, Thanks!

<LivestreamView
                        style={styles.streamView}
                        ref={ref}
                        video={{
                            fps: 30,
                            resolution: res,
                            camera,
                            orientation,
                        }}
                        liveStreamKey='my stream key'
                        rtmpServerUrl="rtmp://broadcast.api.video/s"
                        audio={{
                            muted: audioMuted,
                        }}
                        onConnectionSuccess={() => {
                            console.log('Received onConnectionSuccess');
                        }}
                        onConnectionFailed={e => {
                            console.log('Received onConnectionFailed', e);
                        }}
                        onDisconnect={() => {
                            console.log('Received onDisconnect');
                        }}
                    />
                    <View style={styles.buttonsContainer}>
                        <TouchableOpacity
                            style={{
                                borderRadius: 50,
                                backgroundColor: streaming ? 'red' : 'white',
                                width: 50,
                                height: 50,
                            }}
                            onPress={() => {
                                if (streaming) {
                                    ref.current?.stopStreaming();
                                    setStreaming(false);
                                } else {
                                    ref.current?.startStreaming();
                                    setStreaming(true);
                                }
                            }}
                        />
                    </View>

Hello,

Sorry for the delay.
It is a simple mistake due to an issue on reactnative live streams. You should add a trailing / at the end of rtmpServerUrl. This is going to be fixed in the next version.

Best regards,
Thibault

liveStreamKey={streamInfo.data.streamKey} rtmpServerUrl="rtmp://broadcast.api.video/s/"

Hello, thank you for your help.

I added / to the rtmpServerUrl. But it still does not work. I tested with nodemediaclient, it worked as I expected.

Is there any other suggestion for solving this issue? I prefer using your library to that library above because of convenience and detail documentation.

Hello,

You got camera permission but have you requested RECORD_AUDIO and INTERNET permissions as well?
Could you provide some logs from logcat please?

FYI, we are working on a new version of reactnative-live-stream.