mediaConnectionFailed
Sample payload
{
"type": "mediaConnectionFailed",
"data": {
"direction": "subscribing",
"cause": "network_blocked"
}
}Parameters
Parameter
Type
Description
Usage example
sambaFrame.on('mediaConnectionFailed', ({ direction, cause }) => {
if (cause === 'network_blocked') {
// Rejoining on the same network will not help.
// Suggest switching networks, or swap to a fallback transport (e.g. HLS, dial-in).
showNetworkBlockedFallback({ direction });
} else {
// cause === 'connection_failed' — the issue may be transient.
// Offer a retry, or let the user dismiss and try rejoining.
showConnectionFailedRetry({ direction });
}
});Remarks
Last updated