onUserVideoAvailable property

(void Function(String userId, bool available)?) onUserVideoAvailable
final

A Remote User Published/Unpublished Primary Stream Video

The primary stream is usually used for camera images. If you receive the onUserVideoAvailable (userId, true) callback, it indicates that the user has available primary stream video.

You can then call startRemoteView to subscribe to the remote user’s video. If the subscription is successful, you will receive the onFirstVideoFrame (userId) callback, which indicates that the first video frame of the user is rendered.

If you receive the onUserVideoAvailable (userId, false) callback, it indicates that the video of the remote user is disabled, which may be because the user called muteLocalVideo or stopLocalPreview.

  • Parameters:
    • available(bool):
      • Whether the user published (or unpublished) primary stream video.
        • true: published;
        • false: unpublished.
    • userId(String):
      • User ID of the remote user.

Implementation

final void Function(String userId, bool available)? onUserVideoAvailable;