The client server is not receiving any media data

I’m testing the media data handling using a Javascript app. So far, the app is receiving the initial signaling handshake and can connect to an all/audio/video server URL from the data handshake response. Then, it can receive the media data handshake response that looks like the following:

{
  media_params: {
    audio: {
      channel: 1,
      codec: 1,
      content_type: 2,
      data_opt: 1,
      sample_rate: 1,
      send_rate: 20
    },
    video: { codec: 5, content_type: 3, data_opt: 3, fps: 5, resolution: 2 }
  },
  msg_type: 4,
  payload_encrypted: false,
  protocol_version: 1,
  status_code: 0
}

However, there is no data being sent to the ws.on('message', (data) => {...}) handler after the media data handshake response. There is also no media data keep alive requests coming into the media web socket. In the meantime, there are signaling keep alive requests coming into the signaling web socket and they are being handled properly.

Please advise what’s preventing the media data packets from being sent to the media web socket.

Thank you.

@xgantan are you sending the client acknowledgement message?

After receiving the successful media handshake response (msg_type: 4), you need to send a CLIENT_READY_ACK (msg_type: 7) message to the signaling WebSocket to initiate the media streaming. This message tells the RTMS server that your client is ready to receive media data.

The CLIENT_READY_ACK message should look like this:

{

msg_type: 7, // CLIENT_READY_ACK

rtms_stream_id: "your_stream_id"

}

Got it. Will give it a try.

The dev docs did not mention the step of sending CLIENT_READY_ACK, so I didn’t know it’s required.