on Stream State Changed
Called when a remote participant's video stream health changes.
The SDK polls WebRTC receive-transport stats and fires FREEZE_DETECTED when the decoder reports a freeze, FREEZE_RESOLVED once frames flow again, and STUCK when the receive bitrate stays at zero for several seconds. Fired on the main thread.
Code Example:
public void onStreamStateChanged(StreamState state, String peerId, String streamId) {
if (state == StreamState.FREEZE_DETECTED) {
Log.w("Participant", "Stream frozen: " + streamId);
}
}
Content copied to clipboard
Parameters
state
the new stream health state
peer Id
ID of the participant whose stream changed
stream Id
WebRTC track ID of the affected stream