onRemoteSubscribeFallbackToAudioOnly

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.

virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool isFallbackOrRecover) {
    (void)uid;
    (void)isFallbackOrRecover;
    }
If you call setRemoteSubscribeFallbackOptionand set option to STREAM_FALLBACK_OPTION_AUDIO_ONLY, 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.
Attention: 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 onRemoteVideoStatscallback.

Parameters

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.