onRemoteSubscribeFallbackToAudioOnly property

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

Callback when the subscribed stream falls back to audio-only or recovers to audio and video.

After you call setRemoteSubscribeFallbackOption and set option to streamFallbackOptionAudioOnly, this callback is triggered in the following situations: When the downlink network condition is poor, the subscribed audio and video stream falls back to audio-only When the downlink network condition improves, the subscribed audio-only stream recovers to audio and video When the subscribed stream falls back to a low-quality video stream due to poor network conditions, you can monitor the switching of remote video stream quality through the onRemoteVideoStats callback.

  • uid User ID of the remote user.
  • isFallbackOrRecover true : Due to poor network conditions, the subscribed stream has fallen back to audio-only. false : Due to improved network conditions, the subscribed stream has recovered to audio and video.

Implementation

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