subscribeAllStreamsVideo method

FutureOr<int> subscribeAllStreamsVideo(
  1. BOOL subscribe
)

@detail api @valid since 3.60. Since version 3.60, this interface replaces the subscribeAllStreams and unsubscribeAllStreams methods for the below functions. If you have upgraded to version 3.60 or later and are still using these methods, please migrate to this interface. @author yejing.luna @brief Subscribes to or unsubscribes from all remote video streams captured by camera. @param subscribe Whether to subscribe to the video stream.
- true: Subscribe. - false: Unsubscribe. @return API call result:
- 0: Success - !0: Failure @note - If the subscription options conflict with the previous ones, they are subject to the configurations in the last call. - In the Audio selection, if the number of media streams exceeds the limit, we recommend you call subscribeAllStreamsVideo:{@link #ByteRTCRoom#subscribeAllStreamsVideo} to subscribe each target media stream other than calling this API. - After calling this API, you will be informed of the calling result with rtcRoom:onVideoSubscribeStateChanged:info:state:reason:{@link #ByteRTCRoomDelegate#rtcRoom:onVideoSubscribeStateChanged:info:state:reason}. - Once the local user subscribes to the stream of a remote user, the subscription to the remote user will sustain until the local user leaves the room or unsubscribe from it by calling subscribeAllStreamsVideo:{@link #ByteRTCRoom#subscribeAllStreamsVideo}. - Any other exceptions will be included in rtcRoom:onRoomStateChanged:withUid:state:extraInfo:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomStateChanged:withUid:state:extraInfo}, see ByteRTCErrorCode{@link #ByteRTCErrorCode} for the reasons.

Implementation

FutureOr<int> subscribeAllStreamsVideo(BOOL subscribe) async {
  return await nativeCall('subscribeAllStreamsVideo:', [subscribe]);
}