video streaming – react-native-rtmp-publisher onConnectionFailed

import RTMPPublisher, {
  RTMPPublisherRefProps,
  StreamState,
  BluetoothDeviceStatuses,
 } from 'react-native-rtmp-publisher';

const publisherRef = useRef<RTMPPublisherRefProps>(null);  
const url="rtmp://global-live.mux.com:443/app";

<RTMPPublisher
  ref={publisherRef}
  streamURL={url}
  streamName={stream_key}
  style={styles.publisher_camera}
  onDisconnect={handleOnDisconnect}
  onConnectionFailed={handleOnConnectionFailed}
  onConnectionStarted={handleOnConnectionStarted}
  onConnectionSuccess={handleOnConnectionSuccess}
  onNewBitrateReceived={handleOnNewBitrateReceived}
  onStreamStateChanged={handleOnStreamStateChanged}
  onBluetoothDeviceStatusChanged={handleBluetoothDeviceStatusChange}
 />

Error:: configure stream, Handshake error, unexpected 21 S0 received

The above error is received while calling “publisherRef.current.startStream();”

I tried different streamKey in streamName. what iam expecting is to create live stream in Mux

Read more here: Source link