onRemoteSubscribeFallbackToAudioOnly property

void Function(int uid, bool isFallbackOrRecover)? onRemoteSubscribeFallbackToAudioOnly
final

Occurs when the remote media stream falls back to the audio-only stream due to poor network conditions or switches back to the video stream after the network conditions improve.

If you call setRemoteSubscribeFallbackOption and set option to streamFallbackOptionAudioOnly, the SDK triggers this callback in the following situations: The downstream network condition is poor, and the subscribed video stream is downgraded to audio-only stream. The downstream network condition has improved, and the subscribed stream has been restored to video stream. Once the remote media stream switches to the low-quality video stream due to weak network conditions, you can monitor the stream switch between a high-quality and low-quality stream in the onRemoteVideoStats callback.

  • uid The user ID of the remote user.
  • isFallbackOrRecover true : The subscribed media stream falls back to audio-only due to poor network conditions. false : The subscribed media stream switches back to the video stream after the network conditions improve.

Implementation

final void Function(int uid, bool isFallbackOrRecover)?
    onRemoteSubscribeFallbackToAudioOnly;