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>