reconnectStream doesn't work for remote streams

Hello!

Looks like reconnectStream RPC command only works for my own local streams but not for remove streams. When using for remote stream, the command returns session ID only, SDP answer and stream ID are missing.

Example.

Sent command for my stream:

{“jsonrpc”:“2.0”,“method”:“reconnectStream”,“id”:26,“params”:{“stream”:“str_CAM_VkfI_con_FgTGRVZHqr”,“sdpString”:“…”}}

Received normal answer:

{“id”:26,“result”:{“sdpAnswer”:“…”,“id”:“str_CAM_VkfI_con_FgTGRVZHqr”,“createdAt”:1704582334985,“sessionId”:“3bvrajnnsi63412a08qaqq198l”},“jsonrpc”:“2.0”}

Sent command for remote stream:

Sent: {“jsonrpc”:“2.0”,“method”:“reconnectStream”,“id”:126,“params”:{“stream”:“str_CAM_KOil_con_PMenV9NyKd”,“sdpString”:“…”}}

Received invalid answer:

{“id”:126,“result”:{“sessionId”:“3bvrajnnsi63412a08qaqq198l”},“jsonrpc”:“2.0”}

How I supposed to restore broken remote streams?

@mikeks

Hi mike,

are you sure your command for remote streams is correct?
For you own stream, the parameter is “sdpString” - but for remote streams the parameter should be “sdpOffer”.

Best regards
Stefan

Yes, I think you may be right. The RPC documentation might be outdated in this specific case. For remote streams the parameter sdpString should be called sdpOffer. This problem may be caused by a legacy parameter that was not changed to provide backwards compatibility.

Thank you! This works. Please update the documentation, the right parameter name for remote streams is not listed.

Since your documentation is quite limited, may I ask if there’s another RPC command which let me retrieve all current streams like when I join the room. The recommended way to handle signaling plane loss doesn’t allow me to retrieve streams data in the case if someone join/left the room while signaling plane was interrupted.

Best regards,
Mike