@byteplus/react-native-rtc 1.1.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +88 -57
  2. package/android/build.gradle +23 -14
  3. package/android/proguard-rules.pro +1 -1
  4. package/android/src/live/java/com/volcengine/reactnative/vertc/live/VertcLive.java +76 -8
  5. package/android/src/main/java/com/volcengine/reactnative/vertc/NativeVariableManager.java +0 -5
  6. package/android/src/main/java/com/volcengine/reactnative/vertc/ScreenCaptureHelper.java +13 -18
  7. package/android/src/main/java/com/volcengine/reactnative/vertc/VertcApiEngineManager.java +5 -5
  8. package/android/src/main/java/com/volcengine/reactnative/vertc/VertcHelper.java +30 -0
  9. package/android/src/main/java/com/volcengine/reactnative/vertc/VertcImpl.java +68 -0
  10. package/android/src/main/java/com/volcengine/reactnative/vertc/events/ClassHelper.java +24 -3
  11. package/android/src/main/java/com/volcengine/reactnative/vertc/events/IRTCRoomEventHandlerImpl.java +90 -11
  12. package/android/src/main/java/com/volcengine/reactnative/vertc/events/IRTCVideoEventHandlerImpl.java +65 -4
  13. package/android/src/newarch/com/volcengine/reactnative/vertc/VertcModule.java +86 -0
  14. package/android/src/{main/java → oldarch}/com/volcengine/reactnative/vertc/VertcModule.java +11 -17
  15. package/ios/core/RTCHeader.h +1 -0
  16. package/ios/core/VertcHelper.h +9 -3
  17. package/ios/core/VertcHelper.m +72 -1
  18. package/ios/live/VertcLive.m +164 -12
  19. package/ios/new_arch_core/RCTVertc.h +23 -0
  20. package/ios/new_arch_core/RCTVertc.mm +89 -0
  21. package/ios/new_arch_core/VertcImpl.h +33 -0
  22. package/ios/new_arch_core/VertcImpl.m +53 -0
  23. package/ios/new_arch_core/VertcViewManager.m +51 -0
  24. package/lib/commonjs/index.js +1609 -806
  25. package/lib/module/index.js +1608 -808
  26. package/lib/typescript/codegen/android/api.d.ts +152 -8
  27. package/lib/typescript/codegen/android/callback.d.ts +13 -5
  28. package/lib/typescript/codegen/android/keytype.d.ts +105 -7
  29. package/lib/typescript/codegen/ios/api.d.ts +152 -16
  30. package/lib/typescript/codegen/ios/callback.d.ts +65 -5
  31. package/lib/typescript/codegen/ios/keytype.d.ts +171 -5
  32. package/lib/typescript/codegen/pack/api.d.ts +94 -83
  33. package/lib/typescript/codegen/pack/callback.d.ts +158 -40
  34. package/lib/typescript/codegen/pack/keytype.d.ts +121 -21
  35. package/lib/typescript/interface.d.ts +43 -10
  36. package/lib/typescript/module.d.ts +7 -0
  37. package/lib/typescript/platforms/android/vertc.d.ts +4 -1
  38. package/lib/typescript/platforms/ios/vertc.d.ts +2 -1
  39. package/lib/typescript/platforms/turboModule/NativeVertc.d.ts +26 -0
  40. package/lib/typescript/platforms/turboModule/index.d.ts +4 -0
  41. package/lib/typescript/proxy.d.ts +1 -1
  42. package/lib/typescript/util.d.ts +1 -0
  43. package/package.json +11 -2
  44. package/react-native-rtc.podspec +35 -31
  45. package/src/platforms/turboModule/NativeVertc.ts +33 -0
  46. package/src/platforms/turboModule/index.ts +1 -0
  47. /package/android/src/{main/java → oldarch}/com/volcengine/reactnative/vertc/VertcModuleSpec.java +0 -0
  48. /package/ios/{core → original_arch_core}/VertcModule.h +0 -0
  49. /package/ios/{core → original_arch_core}/VertcModule.m +0 -0
  50. /package/ios/{core → original_arch_core}/VertcViewManager.m +0 -0
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
 
4
4
  import { int, NSString, NSInteger, int64_t, NSData, NSArray, BOOL, id, double, NSDictionary } from './types';
5
- import { ByteRTCAudioFrame, ByteRTCFaceDetectionResult, ByteRTCStreamIndex, ByteRTCRemoteStreamKey, ByteRTCSingScoringRealtimeInfo, ByteRTCStreamMixingEvent, ByteRTCMixedStreamType, ByteRTCVideoFrame, ByteRTCFrameExtendedData, ByteRTCMusicInfo, ByteRTCHotMusicInfo, ByteRTCDownloadResult, ByteRTCPlayerState, ByteRTCPlayerError, ByteRTCRoomStats, ByteRTCAVSyncState, ByteRTCLocalStreamStats, ByteRTCRemoteStreamStats, ByteRTCUserInfo, ByteRTCUserOfflineReason, ByteRTCMediaStreamType, ByteRTCStreamRemoveReason, ByteRTCSubscribeState, ByteRTCSubscribeConfig, ByteRTCSetRoomExtraInfoResult, ByteRTCUserVisibilityChangeError, ByteRTCForwardStreamStateInfo, ByteRTCForwardStreamEventInfo, ByteRTCNetworkQualityStats, ByteRTCSubtitleState, ByteRTCSubtitleMessage, ByteRTCStream, ByteRTCConnectionState, ByteRTCNetworkType, ByteRTCLocalAudioPropertiesInfo, ByteRTCRemoteAudioPropertiesInfo, ByteRTCVideoFrameInfo, ByteRTCAudioDeviceType, ByteRTCMediaDeviceState, ByteRTCMediaDeviceError, ByteRTCVideoDeviceType, ByteRTCMediaDeviceWarning, ByteRTCUser, ByteRTCFirstFrameSendState, ByteRTCFirstFramePlayState, ByteRTCAudioRoute, ByteRTCSEIStreamEventType, ByteRTCSyncInfoStreamType, ByteRTCSysStats, ByteRTCLocalAudioStreamState, ByteRTCLocalAudioStreamError, ByteRTCRemoteAudioState, ByteRTCRemoteAudioStateChangeReason, ByteRTCLocalVideoStreamState, ByteRTCLocalVideoStreamError, ByteRTCRemoteVideoState, ByteRTCRemoteVideoStateChangeReason, ByteRTCLogoutReason, ByteRTCUserOnlineStatus, ByteRTCNetworkDetectionLinkType, ByteRTCNetworkQuality, ByteRTCNetworkDetectionStopReason, ByteRTCPerformanceAlarmMode, ByteRTCPerformanceAlarmReason, ByteRTCSourceWantedData, ByteRTCRemoteStreamSwitchEvent, ByteRTCRecordingState, ByteRTCRecordingErrorCode, ByteRTCRecordingInfo, ByteRTCRecordingProgress, ByteRTCAudioRecordingState, ByteRTCDataMessageSourceType, ByteRTCEchoTestResult, ByteRTCHardwareEchoDetectionResult, ByteRTCLocalProxyType, ByteRTCLocalProxyState, ByteRTCLocalProxyError, ByteRTCMuteState, ByteRTCMediaDeviceType, ByteRTCAudioPlaybackDevice, ByteRTCAudioMixingState, ByteRTCAudioMixingError, ByteRTCStreamMixingType, ByteRTCEncodedVideoFrame, ByteRTCPlayState, ByteRTCKTVPlayerErrorCode } from './keytype';
5
+ import { ByteRTCAudioFrame, ByteRTCFaceDetectionResult, ByteRTCStreamIndex, ByteRTCRemoteStreamKey, ByteRTCSingScoringRealtimeInfo, ByteRTCStreamMixingEvent, ByteRTCMixedStreamType, ByteRTCVideoFrame, ByteRTCFrameExtendedData, ByteRTCMusicInfo, ByteRTCHotMusicInfo, ByteRTCDownloadResult, ByteRTCPlayerState, ByteRTCPlayerError, ByteRTCRoomStats, ByteRTCAVSyncState, ByteRTCLocalStreamStats, ByteRTCRemoteStreamStats, ByteRTCUserInfo, ByteRTCUserOfflineReason, ByteRTCStreamRemoveReason, ByteRTCSubscribeState, ByteRTCSubscribeConfig, ByteRTCSetRoomExtraInfoResult, ByteRTCUserVisibilityChangeError, ByteRTCForwardStreamStateInfo, ByteRTCForwardStreamEventInfo, ByteRTCNetworkQualityStats, ByteRTCSubtitleState, ByteRTCSubtitleMessage, ByteRTCStream, ByteRTCConnectionState, ByteRTCNetworkType, ByteRTCLocalAudioPropertiesInfo, ByteRTCRemoteAudioPropertiesInfo, ByteRTCVideoFrameInfo, ByteRTCAudioDeviceType, ByteRTCMediaDeviceState, ByteRTCMediaDeviceError, ByteRTCVideoDeviceType, ByteRTCMediaDeviceWarning, ByteRTCUser, ByteRTCFirstFrameSendState, ByteRTCFirstFramePlayState, ByteRTCAudioRoute, ByteRTCSEIStreamEventType, ByteRTCSyncInfoStreamType, ByteRTCSysStats, ByteRTCLocalAudioStreamState, ByteRTCLocalAudioStreamError, ByteRTCRemoteAudioState, ByteRTCRemoteAudioStateChangeReason, ByteRTCLocalVideoStreamState, ByteRTCLocalVideoStreamError, ByteRTCRemoteVideoState, ByteRTCRemoteVideoStateChangeReason, ByteRTCLogoutReason, ByteRTCUserOnlineStatus, ByteRTCNetworkDetectionLinkType, ByteRTCNetworkQuality, ByteRTCNetworkDetectionStopReason, ByteRTCPerformanceAlarmMode, ByteRTCPerformanceAlarmReason, ByteRTCSourceWantedData, ByteRTCRemoteStreamSwitchEvent, ByteRTCRecordingState, ByteRTCRecordingErrorCode, ByteRTCRecordingInfo, ByteRTCRecordingProgress, ByteRTCAudioRecordingState, ByteRTCDataMessageSourceType, ByteRTCEchoTestResult, ByteRTCHardwareEchoDetectionResult, ByteRTCLocalProxyType, ByteRTCLocalProxyState, ByteRTCLocalProxyError, ByteRTCMuteState, ByteRTCMediaDeviceType, ByteRTCAudioPlaybackDevice, ByteRTCAudioMixingState, ByteRTCAudioMixingError, ByteRTCStreamMixingType, ByteRTCEncodedVideoFrame, ByteRTCPlayState, ByteRTCKTVPlayerErrorCode, ByteRTCSubscribeStateChangeReason, ByteRTCPublishStateChangeReason, ByteRTCPublishState } from './keytype';
6
6
  import { ByteRTCSingleStreamPushEvent, ByteRTCStreamMixingErrorCode, ByteRTCKTVErrorCode, ByteRTCUserMessageSendResult, ByteRTCRoomMessageSendResult, ByteRTCSubtitleErrorCode, ByteRTCWarningCode, ByteRTCErrorCode, ByteRTCLoginErrorCode, ByteRTCAudioRecordingErrorCode, ByteRTCPublicStreamErrorCode, ByteRtcTranscoderErrorCode } from './errorcode';
7
7
  import { ByteRTCImage } from './external';
8
8
  import { ByteRTCKTVManager, ByteRTCRoom, ByteRTCVideo, ByteRTCKTVPlayer } from './api';
@@ -68,6 +68,14 @@ export declare class ByteRTCRoomDelegate {
68
68
  rtcRoom$onStreamStateChanged$withUid$state$extraInfo?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: NSInteger, extraInfo: NSString): void;
69
69
  rtcRoom$onLeaveRoom?(rtcRoom: ByteRTCRoom, stats: ByteRTCRoomStats): void;
70
70
  rtcRoom$onAVSyncStateChange?(rtcRoom: ByteRTCRoom, state: ByteRTCAVSyncState): void;
71
+ rtcRoom$onVideoPublishStateChanged$Uid$state$reason?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: ByteRTCPublishState, reason: ByteRTCPublishStateChangeReason): void;
72
+ rtcRoom$onAudioPublishStateChanged$Uid$state$reason?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: ByteRTCPublishState, reason: ByteRTCPublishStateChangeReason): void;
73
+ rtcRoom$onScreenVideoPublishStateChanged$Uid$state$reason?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: ByteRTCPublishState, reason: ByteRTCPublishStateChangeReason): void;
74
+ rtcRoom$onScreenAudioPublishStateChanged$Uid$state$reason?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: ByteRTCPublishState, reason: ByteRTCPublishStateChangeReason): void;
75
+ rtcRoom$onVideoSubscribeStateChanged$Uid$state$reason?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: ByteRTCSubscribeState, reason: ByteRTCSubscribeStateChangeReason): void;
76
+ rtcRoom$onAudioSubscribeStateChanged$Uid$state$reason?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: ByteRTCSubscribeState, reason: ByteRTCSubscribeStateChangeReason): void;
77
+ rtcRoom$onScreenVideoSubscribeStateChanged$Uid$state$reason?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: ByteRTCSubscribeState, reason: ByteRTCSubscribeStateChangeReason): void;
78
+ rtcRoom$onScreenAudioSubscribeStateChanged$Uid$state$reason?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, state: ByteRTCSubscribeState, reason: ByteRTCSubscribeStateChangeReason): void;
71
79
  rtcRoom$onRoomStats?(rtcRoom: ByteRTCRoom, stats: ByteRTCRoomStats): void;
72
80
  rtcRoom$onLocalStreamStats?(rtcRoom: ByteRTCRoom, stats: ByteRTCLocalStreamStats): void;
73
81
  rtcRoom$onRemoteStreamStats?(rtcRoom: ByteRTCRoom, stats: ByteRTCRemoteStreamStats): void;
@@ -76,10 +84,62 @@ export declare class ByteRTCRoomDelegate {
76
84
  onTokenWillExpire?(rtcRoom: ByteRTCRoom): void;
77
85
  onPublishPrivilegeTokenWillExpire?(rtcRoom: ByteRTCRoom): void;
78
86
  onSubscribePrivilegeTokenWillExpire?(rtcRoom: ByteRTCRoom): void;
79
- rtcRoom$onUserPublishStream$type?(rtcRoom: ByteRTCRoom, userId: NSString, type: ByteRTCMediaStreamType): void;
80
- rtcRoom$onUserUnpublishStream$type$reason?(rtcRoom: ByteRTCRoom, userId: NSString, type: ByteRTCMediaStreamType, reason: ByteRTCStreamRemoveReason): void;
81
- rtcRoom$onUserPublishScreen$type?(rtcRoom: ByteRTCRoom, userId: NSString, type: ByteRTCMediaStreamType): void;
82
- rtcRoom$onUserUnpublishScreen$type$reason?(rtcRoom: ByteRTCRoom, userId: NSString, type: ByteRTCMediaStreamType, reason: ByteRTCStreamRemoveReason): void;
87
+ /** {en}
88
+ * @detail callback
89
+ * @valid since 3.60
90
+ * @brief Callback on remote camera-video streams in the room.
91
+ * @param roomId Room ID.
92
+ * @param uid The ID of the remote user who published the stream.
93
+ * @param isPublish Whether the stream is published.
94
+ * + `true`: Published
95
+ * + `false`: Removed
96
+ * @note You will receive this callback after a remote user successfully published media streams captured by camera/microphone in the room with publishStreamVideo{@link #IRTCRoom#publishStreamVideo}. Then you can choose whether to call subscribeStreamVideo{@link #IRTCRoom#subscribeStreamVideo} to subscribe to the streams or not.
97
+ *
98
+ */
99
+ rtcRoom$onUserPublishStreamVideo$uid$isPublish?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, isPublish: BOOL): void;
100
+ /** {en}
101
+ * @detail callback
102
+ * @valid since 3.60
103
+ * @region Room management
104
+ * @brief Callback on remote microphone-audio streams in the room.
105
+ * @param roomId Room ID.
106
+ * @param uid The ID of the remote user who published the stream.
107
+ * @param isPublish Whether the stream is published.
108
+ * + `true`: Published
109
+ * + `false`: Removed
110
+ * @note You will receive this callback after a remote user successfully published media streams captured by camera/microphone in the room with publishStreamAudio:{@link #ByteRTCRoom#publishStreamAudio}. Then you can choose whether to call subscribeStreamAudio{@link #IRTCRoom#subscribeStreamAudio} to subscribe to the streams or not.
111
+ *
112
+ */
113
+ rtcRoom$onUserPublishStreamAudio$uid$isPublish?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, isPublish: BOOL): void;
114
+ /** {en}
115
+ * @detail callback
116
+ * @valid since 3.60
117
+ * @region Room management
118
+ * @brief Callback on remote screen streams in the room.
119
+ * @param roomId Room ID.
120
+ * @param uid The ID of the remote user who published the stream.
121
+ * @param isPublish Whether the stream is published.
122
+ * + `true`: Published
123
+ * + `false`: Removed
124
+ * @note You will receive this callback after a remote user successfully published screen streams in the room with publishScreenVideo{@link #IRTCRoom#publishScreenVideo}. Then you can choose whether to call subscribeScreenVideo{@link #IRTCRoom#subscribeScreenVideo} to subscribe to the streams or not.
125
+ *
126
+ */
127
+ rtcRoom$onUserPublishScreenVideo$uid$isPublish?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, isPublish: BOOL): void;
128
+ /** {en}
129
+ * @detail callback
130
+ * @valid since 3.60
131
+ * @region Room management
132
+ * @author shenpengliang
133
+ * @brief Callback on remote computer-audio streams in the room.
134
+ * @param roomId Room ID.
135
+ * @param uid The ID of the remote user who published the stream.
136
+ * @param isPublish Whether the stream is published.
137
+ * + `true`: Published
138
+ * + `false`: Removed
139
+ * @note You will receive this callback after a remote user successfully published media streams captured by camera/microphone in the room with publishScreenAudio{@link #IRTCRoom#publishScreenAudio}. Then you can choose whether to call subscribeScreenAudio{@link #IRTCRoom#subscribeScreenAudio} to subscribe to the streams or not.
140
+ *
141
+ */
142
+ rtcRoom$onUserPublishScreenAudio$uid$isPublish?(rtcRoom: ByteRTCRoom, roomId: NSString, uid: NSString, isPublish: BOOL): void;
83
143
  rtcRoom$onStreamSubscribed$userId$subscribeConfig?(rtcRoom: ByteRTCRoom, state: ByteRTCSubscribeState, userId: NSString, info: ByteRTCSubscribeConfig): void;
84
144
  rtcRoom$onRoomMessageReceived$message?(rtcRoom: ByteRTCRoom, uid: NSString, message: NSString): void;
85
145
  rtcRoom$onRoomBinaryMessageReceived$message?(rtcRoom: ByteRTCRoom, uid: NSString, message: NSData): void;
@@ -63,6 +63,102 @@ export declare enum ByteRTCMessageConfig {
63
63
  ByteRTCMessageConfigUnreliableOrdered = 1,
64
64
  ByteRTCMessageConfigUnreliableUnordered = 2
65
65
  }
66
+ export declare enum ByteRTCPublishStateChangeReason {
67
+ /** {en}
68
+ * @brief Requested to publish.
69
+ *
70
+ */
71
+ ByteRTCPublishStateChangeReasonPublish = 0,
72
+ /** {en}
73
+ * @brief Requested to remove.
74
+ *
75
+ */
76
+ ByteRTCPublishStateChangeReasonUnpublish = 1,
77
+ /** {en}
78
+ * @brief The token the user used was not permitted to publish.
79
+ *
80
+ */
81
+ ByteRTCPublishStateChangeReasonNoPublishPermission = 2,
82
+ /** {en}
83
+ * @brief The number of streams the user has published has exceeded the limit.
84
+ *
85
+ */
86
+ ByteRTCPublishStateChangeReasonOverStreamPublishLimit = 3,
87
+ /** {en}
88
+ * @brief The stream failed to remove from a room when you are publishing the stream in two or more rooms.
89
+ *
90
+ */
91
+ ByteRTCPublishStateChangeReasonMultiRoomUnpublishFailed = 4,
92
+ /** {en}
93
+ * @brief Failed to publish due to the server error.
94
+ *
95
+ */
96
+ ByteRTCPublishStateChangeReasonPublishStreamFailed = 5,
97
+ /** {en}
98
+ * @brief The user who tried to publish a stream is not a host. Call setUserVisibility{@link #IRTCRoom#setUserVisibility} to change the user role.
99
+ *
100
+ */
101
+ ByteRTCPublishStateChangeReasonPublishStreamForbidden = 6,
102
+ /** {en}
103
+ * @brief The user who tried to publish a stream has already published a stream in a room.
104
+ *
105
+ */
106
+ ByteRTCPublishStateChangeReasonUserInPublish = 7
107
+ }
108
+ export declare enum ByteRTCPublishState {
109
+ /** {en}
110
+ * @brief Successfully published.
111
+ *
112
+ */
113
+ ByteRTCPublishStatePublish = 0,
114
+ /** {en}
115
+ * @brief Failed to publish.
116
+ *
117
+ */
118
+ ByteRTCPublishStateUnpublish = 1
119
+ }
120
+ export declare enum ByteRTCSubscribeStateChangeReason {
121
+ /** {en}
122
+ * @brief Requested to subscribe.
123
+ *
124
+ */
125
+ ByteRTCSubscribeStateChangeReasonSubscribe = 0,
126
+ /** {en}
127
+ * @brief Requested to unsubscribe.
128
+ *
129
+ */
130
+ ByteRTCSubscribeStateChangeReasonUnsubscribe = 1,
131
+ /** {en}
132
+ * @brief The remote user published a stream.
133
+ *
134
+ */
135
+ ByteRTCSubscribeStateChangeReasonRemotePublish = 2,
136
+ /** {en}
137
+ * @brief The remote user removed a stream.
138
+ *
139
+ */
140
+ ByteRTCSubscribeStateChangeReasonRemoteUnpublish = 3,
141
+ /** {en}
142
+ * @brief Failed to subscribe due to the server error. The SDK will automatically retry.
143
+ *
144
+ */
145
+ ByteRTCSubscribeStateChangeReasonStreamFailed5xx = 4,
146
+ /** {en}
147
+ * @brief Failed to subscribe since the stream to be subscribe to was not found in the room. The SDK will automatically retry the subscription. If the subscription still fails, we recommend you exit and retry.
148
+ *
149
+ */
150
+ ByteRTCSubscribeStateChangeReasonStreamFailed404 = 5,
151
+ /** {en}
152
+ * @brief The number of streams the user has subscribed to has exceeded the limit.
153
+ *
154
+ */
155
+ ByteRTCSubscribeStateChangeReasonOverStreamSubscribeLimit = 6,
156
+ /** {en}
157
+ * @brief The user was not permitted to subscribe to the stream.
158
+ *
159
+ */
160
+ ByteRTCSubscribeStateChangeReasonNoSubscribePermission = 7
161
+ }
66
162
  export declare class ByteRTCVideoSinkDelegate {
67
163
  onFrame?(videoFrame: ByteRTCVideoFrame): void;
68
164
  renderPixelBuffer$rotation$contentType$extendedData?(pixelBuffer: CVPixelBufferRef, rotation: ByteRTCVideoRotation, contentType: ByteRTCVideoContentType, extendedData: NSData): void;
@@ -436,13 +532,50 @@ export declare enum ByteRTCAudioRecordingState {
436
532
  ByteRTCAudioRecordingStateSuccess = 2
437
533
  }
438
534
  export declare enum ByteRTCMediaDeviceState {
535
+ /** {en}
536
+ * @brief On
537
+ *
538
+ */
439
539
  ByteRTCMediaDeviceStateStarted = 1,
540
+ /** {en}
541
+ * @brief Off
542
+ *
543
+ */
440
544
  ByteRTCMediaDeviceStateStopped = 2,
545
+ /** {en}
546
+ * @brief Runtime error <br>
547
+ * For example, when the media device is expected to be working but no data is received.
548
+ *
549
+ */
441
550
  ByteRTCMediaDeviceStateRuntimeError = 3,
551
+ /** {en}
552
+ * @brief Added <br>
553
+ * Call enumerate-device api to update the device list when you get this notification.
554
+ *
555
+ */
442
556
  ByteRTCMediaDeviceStateAdded = 10,
557
+ /** {en}
558
+ * @brief Removed <br>
559
+ * Call enumerate-device api to update the device list when you get this notification.
560
+ *
561
+ */
443
562
  ByteRTCMediaDeviceStateRemoved = 11,
563
+ /** {en}
564
+ * @brief Phone calls, locking screen or the other Apps interrupted the RTC call. RTC call will resume once the call ends or the other Apps release the media devices.
565
+ *
566
+ */
444
567
  ByteRTCMediaDeviceStateInterruptionBegan = 12,
568
+ /** {en}
569
+ * @brief RTC call resumed from the interruption caused by the phone calls or the other Apps.
570
+ *
571
+ */
445
572
  ByteRTCMediaDeviceStateInterruptionEnded = 13,
573
+ /** {en}
574
+ * @hidden(iOS)
575
+ * @brief Notification of receiving the device list after time-out. <br>
576
+ * Call enumerate-device api to update the device list when you get this notification.
577
+ *
578
+ */
446
579
  ByteRTCMediaDeviceListUpdated = 16
447
580
  }
448
581
  export declare enum ByteRTCAudioRoute {
@@ -573,10 +706,37 @@ export declare class ByteRTCFrameExtendedData {
573
706
  init(): this;
574
707
  }
575
708
  export declare class ByteRTCRoomConfig {
709
+ /** {en}
710
+ * @brief Room profile. See ByteRTCRoomProfile{@link #ByteRTCRoomProfile}. The default is `ByteRTCRoomProfileCommunication`. The setting cannot be changed after joining the room.
711
+ */
576
712
  profile: ByteRTCRoomProfile;
577
- isAutoPublish: BOOL;
713
+ /** {en}
714
+ * @brief Whether to automatically subscribe to the audio stream. The default is automatic subscription.
715
+ * + Changing the user role to audience via `setUserVisibility` will void this setting.
716
+ * + You can publish streams in only one of the rooms you have participated. If you have joined multiple rooms with the automatically publishing setting, the stream will be added into the first room you have joined only.
717
+ *
718
+ */
719
+ isPublishAudio: BOOL;
720
+ /** {en}
721
+ * @brief Whether to publish media streams automatically. The default is automatic publishing.
722
+ * + Changing the user role to audience via setUserVisibility:{@link #ByteRTCRoom#setUserVisibility} will void this setting.
723
+ * + You can publish streams in only one of the rooms you have participated. If you have joined multiple rooms with the automatically publishing setting, the stream will be added into the first room you have joined only.
724
+ *
725
+ */
726
+ isPublishVideo: BOOL;
727
+ /** {en}
728
+ * @brief Whether to automatically subscribe to the audio stream. The default is automatic subscription. <br>
729
+ * This setting affects both the main stream and the screen-sharing stream.
730
+ */
578
731
  isAutoSubscribeAudio: BOOL;
732
+ /** {en}
733
+ * @brief Whether to automatically subscribe to the video stream. The default is automatic subscription. <br>
734
+ * This setting affects both the main stream and the screen-sharing stream.
735
+ */
579
736
  isAutoSubscribeVideo: BOOL;
737
+ /** {en}
738
+ * @brief Expected configuration of remote video stream, see ByteRTCRemoteVideoConfig{@link #ByteRTCRemoteVideoConfig}.
739
+ */
580
740
  remoteVideoConfig: ByteRTCRemoteVideoConfig;
581
741
  init(): this;
582
742
  }
@@ -1955,10 +2115,16 @@ export declare class ByteRTCMixedStreamAudioConfig {
1955
2115
  init(): this;
1956
2116
  }
1957
2117
  export declare enum ByteRTCSubscribeState {
1958
- ByteRTCSubscribeStateSuccess = 0,
1959
- ByteRTCSubscribeStateFailedNotInRoom = 1,
1960
- ByteRTCSubscribeStateFailedStreamNotFound = 2,
1961
- ByteRTCSubscribeStateFailedOverLimit = 3
2118
+ /** {en}
2119
+ * @brief Successfully subscribed.
2120
+ *
2121
+ */
2122
+ ByteRTCSubscribeStateSubscribe = 0,
2123
+ /** {en}
2124
+ * @brief Failed to subscribe.
2125
+ *
2126
+ */
2127
+ ByteRTCSubscribeStateUnsubscribe = 1
1962
2128
  }
1963
2129
  export declare enum ByteRTCVideoEncoderPreference {
1964
2130
  ByteRTCVideoEncoderPreferenceDisabled = 0,
@@ -2905,145 +2905,156 @@ export declare class RTCRoom {
2905
2905
  setRemoteVideoConfig(userId: string, remoteVideoConfig: RemoteVideoConfig): number;
2906
2906
  /** {en}
2907
2907
  * @detail api
2908
- * @region Room Management
2909
- * @author shenpengliang
2910
- * @brief Publishes media streams captured by camera/microphone in the current room.
2911
- * @param type Media stream type, used for specifying whether to publish audio stream or video stream. See {@link MediaStreamType MediaStreamType}.
2908
+ * @valid since 3.60.
2909
+ * @brief Start or stop publishing video streams captured by camera in the current room.
2910
+ * @param publish Whether to publish the media stream.
2912
2911
  * @return
2913
2912
  * - 0: Success.
2914
- * - < 0 : Fail. See {@link ReturnStatus ReturnStatus} for more details
2913
+ * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
2915
2914
  * @note
2916
- * - You don't need to call this API if you set it to Auto-publish when calling {@link joinRoom joinRoom}.
2917
- * - An invisible user cannot publish media streams. Call {@link setUserVisibility setUserVisibility} to change your visibility in the room.
2918
- * - Call {@link publishScreen publishScreen} to start screen sharing.
2919
- * - Call {@link startForwardStreamToRooms startForwardStreamToRooms} to forward the published streams to the other rooms.
2920
- * - After you call this API, the other users in the room will receive {@link onUserPublishStream onUserPublishStream}. Those who successfully received your streams will receive {@link onFirstRemoteAudioFrame onFirstRemoteAudioFrame}{@link onFirstRemoteVideoFrameDecoded /onFirstRemoteVideoFrameDecoded} at the same time.
2921
- * - Call {@link unpublishStream unpublishStream} to stop publishing streams.
2915
+ * - You don't need to call this API if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}.
2916
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room.
2917
+ * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) and/or publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop screen sharing.
2918
+ * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
2919
+ * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
2920
+ * - After you call this API, the other users in the room will receive onUserPublishStreamVideo{@link #IRTCRoomEventHandler#onUserPublishStreamVideo}. Those who successfully received your streams will receive onFirstRemoteVideoFrameDecoded{@link #IRTCEngineEventHandler#onFirstRemoteVideoFrameDecoded} at the same time.
2922
2921
  *
2923
2922
  */
2924
- publishStream(type: MediaStreamType): Promise<number>;
2923
+ publishStreamVideo(publish: boolean): number;
2925
2924
  /** {en}
2926
2925
  * @detail api
2927
- * @region Room Management
2928
- * @author shenpengliang
2929
- * @brief Stops publishing media streams captured by camera/microphone in the current room.
2930
- * @param type Media stream type, used for specifying whether to stop publishing audio stream or video stream. See {@link MediaStreamType MediaStreamType}.
2926
+ * @valid since 3.60.
2927
+ * @brief Start or stop publishing media streams captured by the local microphone in the current room.
2928
+ * @param publish Whether to publish the media stream.
2931
2929
  * @return
2932
2930
  * - 0: Success.
2933
- * - < 0 : Fail. See {@link ReturnStatus ReturnStatus} for more details
2931
+ * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
2934
2932
  * @note
2935
- * - After calling {@link publishStream publishStream}, call this API to stop publishing streams.
2936
- * - After calling this API, the other users in the room will receive {@link onUserUnpublishStream onUserUnpublishStream}
2933
+ * - You don't need to call this API if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}.
2934
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room.
2935
+ * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) and/or publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop screen sharing.
2936
+ * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
2937
+ * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
2938
+ * - After you call this API, the other users in the room will receive onUserPublishStreamAudio{@link #IRTCRoomEventHandler#onUserPublishStreamAudio}. Those who successfully received your streams will receive onFirstRemoteAudioFrame{@link #IRTCEngineEventHandler#onFirstRemoteAudioFrame} at the same time.
2937
2939
  *
2938
2940
  */
2939
- unpublishStream(type: MediaStreamType): Promise<number>;
2941
+ publishStreamAudio(publish: boolean): number;
2940
2942
  /** {en}
2941
2943
  * @detail api
2942
- * @region Screen Sharing
2943
- * @author liyi.000
2944
- * @brief Publishes local screen sharing streams in the current room.
2945
- * @param type Media stream type, used for specifying whether to publish audio stream or video stream. See {@link MediaStreamType MediaStreamType}.
2944
+ * @valid since 3.60.
2945
+ * @brief Start or stop sharing the local screen in the room.
2946
+ * If you need to share your screen in multiple rooms, you can use the same uid to join multiple rooms and call this API in each room. Also, you can publish different types of screen-sharing streams in different rooms.
2947
+ * @param publish Whether to publish video stream.
2946
2948
  * @return
2947
2949
  * - 0: Success.
2948
- * - < 0 : Fail. See {@link ReturnStatus ReturnStatus} for more details
2950
+ * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
2949
2951
  * @note
2950
- * - You need to call this API to publish screen even if you set it to Auto-publish when calling {@link joinRoom joinRoom}.
2951
- * - An invisible user cannot publish media streams. Call {@link setUserVisibility setUserVisibility} to change your visibility in the room.
2952
- * - After you called this API, the other users in the room will receive {@link onUserPublishScreen onUserPublishScreen}. Those who successfully received your streams will receive {@link onFirstRemoteAudioFrame onFirstRemoteAudioFrame}{@link onFirstRemoteVideoFrameDecoded /onFirstRemoteVideoFrameDecoded} at the same time.
2953
- * - After calling this API, you'll receive {@link onScreenVideoFrameSendStateChanged onScreenVideoFrameSendStateChanged}.
2954
- * - Call {@link startForwardStreamToRooms startForwardStreamToRooms} to forward the published streams to the other rooms.
2955
- * - Call {@link unpublishScreen unpublishScreen} to stop publishing screen-sharing streams.
2956
- * - Refer to [Sharing Screen in Android](https://docs.byteplus.com/byteplus-rtc/docs/124176) for more information.
2952
+ * - You need to call this API to publish screen even if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}.
2953
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room.
2954
+ * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) to start or stop sharing computer audio.
2955
+ * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
2956
+ * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
2957
+ * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
2958
+ * - After you called this API, the other users in the room will receive onUserPublishScreenVideo{@link #IRTCRoomEventHandler#onUserPublishScreenVideo}. Those who successfully received your streams will receive onFirstRemoteVideoFrameDecoded{@link #IRTCEngineEventHandler#onFirstRemoteVideoFrameDecoded} at the same time.
2959
+ * - After calling this API, you'll receive onScreenVideoFrameSendStateChanged{@link #IRTCEngineEventHandler#onScreenVideoFrameSendStateChanged}.
2960
+ * - Refer to [Sharing Screen in PC](https://docs.byteplus.com/byteplus-rtc/docs/70144) for more information.
2957
2961
  *
2958
2962
  */
2959
- publishScreen(type: MediaStreamType): Promise<number>;
2963
+ publishScreenVideo(publish: boolean): number;
2960
2964
  /** {en}
2965
+ * @hidden(Linux)
2961
2966
  * @detail api
2962
- * @region Screen Sharing
2963
- * @author liyi.000
2964
- * @brief Stops publishing local screen sharing streams in the current room.
2965
- * @param type Media stream type, used for specifying whether to stop publishing audio stream or video stream. See {@link MediaStreamType MediaStreamType}.
2967
+ * @valid since 3.60.
2968
+ * @brief Manually publishes local screen-sharing streams in the current room. <br>
2969
+ * If you need to share your screen in multiple rooms, you can use the same uid to join multiple rooms and call this API in each room. Also, you can publish different types of screen-sharing streams in different rooms.
2970
+ * @param publish Media stream type, used for specifying whether to publish audio stream or video stream.
2966
2971
  * @return
2967
2972
  * - 0: Success.
2968
- * - < 0 : Fail. See {@link ReturnStatus ReturnStatus} for more details
2973
+ * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
2969
2974
  * @note
2970
- * - After calling {@link publishScreen publishScreen}, call this API to stop publishing streams.
2971
- * - After calling this API, the other users in the room will receive {@link onUserUnpublishScreen onUserUnpublishScreen}.
2975
+ * - You need to call this API to publish screen even if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}.
2976
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room.
2977
+ * - Call publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop sharing the local screen.
2978
+ * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
2979
+ * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
2980
+ * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
2981
+ * - After you called this API, the other users in the room will receive onUserPublishScreenAudio{@link #IRTCRoomEventHandler#onUserPublishScreenAudio}. Those who successfully received your streams will receive onFirstRemoteAudioFrame{@link #IRTCEngineEventHandler#onFirstRemoteAudioFrame} at the same time.
2982
+ * - Refer to [Sharing Screen in PC](https://docs.byteplus.com/byteplus-rtc/docs/70144) for more information.
2972
2983
  *
2973
2984
  */
2974
- unpublishScreen(type: MediaStreamType): Promise<number>;
2985
+ publishScreenAudio(publish: boolean): number;
2975
2986
  /** {en}
2976
2987
  * @detail api
2977
- * @region Room Management
2978
- * @author shenpengliang
2979
- * @brief Subscribes to specific remote media streams captured by camera/microphone. Or update the options of the subscribed user.
2980
- * @param uid ID of the remote user who published the target audio/video stream.
2981
- * @param type Media stream type, used for specifying whether to subscribe to the audio stream or the video stream. See {@link MediaStreamType MediaStreamType}.
2988
+ * @valid since 3.60.
2989
+ * @brief Subscribes to specific remote media streams captured by the local camera. Or update the subscribe options of the subscribed user.
2990
+ * @param userId The ID of the remote user who published the target video stream.
2991
+ * @param subscribe Whether to subscribe to the stream.
2982
2992
  * @return API call result: <br>
2983
2993
  * - 0: Success.
2984
- * - <0: Failure. See {@link ReturnStatus ReturnStatus} for specific reasons.
2994
+ * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons.
2985
2995
  * @note
2986
2996
  * - Calling this API to update the subscribe configuration when the user has subscribed the remote user either by calling this API or by auto-subscribe.
2987
- * - You must first get the remote stream information through {@link onUserPublishStream onUserPublishStream} before calling this API to subscribe to streams accordingly.
2988
- * - After calling this API, you will be informed of the calling result with {@link onStreamSubscribed onStreamSubscribed}.
2989
- * - 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 {@link unsubscribeStream unsubscribeStream}.
2990
- * - Any other exceptions will be included in {@link onStreamStateChanged onStreamStateChanged}, see {@link ErrorCode ErrorCode} for the reasons.
2997
+ * - You must first get the remote stream information through onUserPublishStreamVideo{@link #IRTCRoomEventHandler#onUserPublishStreamVideo} before calling this API to subscribe to streams accordingly.
2998
+ * - After calling this API, you will be informed of the calling result with onVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onVideoSubscribeStateChanged}.
2999
+ * - 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 subscribeStreamVideo{@link #RTCRoom#subscribeStreamVideo}.
3000
+ * - Any other exceptions will be included in onVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onVideoSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
2991
3001
  *
2992
3002
  */
2993
- subscribeStream(uid: string, type: MediaStreamType): Promise<number>;
3003
+ subscribeStreamVideo(userId: string, subscribe: boolean): number;
2994
3004
  /** {en}
2995
3005
  * @detail api
2996
- * @region Room Management
2997
- * @author shenpengliang
2998
- * @brief Unsubscribes from specific remote media streams captured by camera/microphone. <br>
2999
- * You can call this API in both automatic subscription mode and manual subscription mode.
3000
- * @param uid The ID of the remote user who published the target audio/video stream.
3001
- * @param type Media stream type, used for specifying whether to unsubscribe from the audio stream or the video stream. See {@link MediaStreamType MediaStreamType}.
3006
+ * @valid since 3.60.
3007
+ * @brief Subscribes to specific remote media streams captured by the local microphone. Or update the subscribe options of the subscribed user.
3008
+ * @param userId The ID of the remote user who published the target media stream.
3009
+ * @param subscribe Whether to subscribe to the audio stream.
3002
3010
  * @return API call result: <br>
3003
3011
  * - 0: Success.
3004
- * - <0: Failure. See {@link ReturnStatus ReturnStatus} for specific reasons.
3012
+ * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons.
3005
3013
  * @note
3006
- * - After calling this API, you will be informed of the calling result with {@link onStreamSubscribed onStreamSubscribed}.
3007
- * - Any other exceptions will be included in {@link onStreamStateChanged onStreamStateChanged}, see {@link ErrorCode ErrorCode} for the reasons.
3014
+ * - Calling this API to update the subscribe configuration when the user has subscribed the remote user either by calling this API or by auto-subscribe.
3015
+ * - You must first get the remote stream information through onUserPublishStreamAudio{@link #IRTCRoomEventHandler#onUserPublishStreamAudio} before calling this API to subscribe to streams accordingly.
3016
+ * - After calling this API, you will be informed of the calling result with onAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onAudioSubscribeStateChanged}.
3017
+ * - 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 subscribeStreamAudio{@link #RTCRoom#subscribeStreamAudio}.
3018
+ * - Any other exceptions will be included in onAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onAudioSubscribeStateChanged}, see ErrorCode{@link #ErrorCode} for the reasons.
3008
3019
  *
3009
3020
  */
3010
- unsubscribeStream(uid: string, type: MediaStreamType): Promise<number>;
3021
+ subscribeStreamAudio(userId: string, subscribe: boolean): number;
3011
3022
  /** {en}
3012
3023
  * @detail api
3013
- * @region Room Management
3014
- * @author shenpengliang
3015
- * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user.
3016
- * @param uid The ID of the remote user who published the target screen audio/video stream.
3017
- * @param type Media stream type, used for specifying whether to subscribe to the audio stream or the video stream. See {@link MediaStreamType MediaStreamType}.
3024
+ * @valid since 3.60.
3025
+ * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user.
3026
+ * @param userId The ID of the remote user who published the target screen video stream.
3027
+ * @param subscribe Whether to subscribe to the screen video stream.
3018
3028
  * @return API call result: <br>
3019
3029
  * - 0: Success.
3020
- * - <0: Failure. See {@link ReturnStatus ReturnStatus} for specific reasons.
3030
+ * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons.
3021
3031
  * @note
3022
3032
  * - Calling this API to update the subscribe configuration when the user has subscribed the remote user either by calling this API or by auto-subscribe.
3023
- * - You must first get the remote stream information through {@link onUserPublishScreen onUserPublishScreen} before calling this API to subscribe to streams accordingly.
3024
- * - After calling this API, you will be informed of the calling result with {@link onStreamSubscribed onStreamSubscribed}.
3025
- * - 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 {@link unsubscribeScreen unsubscribeScreen}.
3026
- * - Any other exceptions will be included in {@link onStreamStateChanged onStreamStateChanged}, see {@link ErrorCode ErrorCode} for the reasons.
3033
+ * - You must first get the remote stream information through onUserPublishScreenVideo{@link #IRTCRoomEventHandler#onUserPublishScreenVideo} before calling this API to subscribe to streams accordingly.
3034
+ * - After calling this API, you will be informed of the calling result with onScreenVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenVideoSubscribeStateChanged}.
3035
+ * - 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 subscribeScreenVideo{@link #RTCRoom#subscribeScreenVideo}.
3036
+ * - Any other exceptions will be included in onScreenVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenVideoSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
3027
3037
  *
3028
3038
  */
3029
- subscribeScreen(uid: string, type: MediaStreamType): Promise<number>;
3039
+ subscribeScreenVideo(userId: string, subscribe: boolean): number;
3030
3040
  /** {en}
3031
3041
  * @detail api
3032
- * @region Room Management
3033
- * @author shenpengliang
3034
- * @brief Unsubscribes from specific screen sharing media stream. <br>
3035
- * You can call this API in both automatic subscription mode and manual subscription mode.
3036
- * @param uid The ID of the remote user who published the target screen audio/video stream.
3037
- * @param type Media stream type, used for specifying whether to unsubscribe from the audio stream or the video stream. See {@link MediaStreamType MediaStreamType}.
3042
+ * @valid since 3.60.
3043
+ * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user.
3044
+ * @param userId The ID of the remote user who published the target screen audio stream.
3045
+ * @param subscribe Whether to subscribe to the screen audio stream.
3038
3046
  * @return API call result: <br>
3039
3047
  * - 0: Success.
3040
- * - <0: Failure. See {@link ReturnStatus ReturnStatus} for specific reasons.
3048
+ * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons.
3041
3049
  * @note
3042
- * - After calling this API, you will be informed of the calling result with {@link onStreamSubscribed onStreamSubscribed}.
3043
- * - Any other exceptions will be included in {@link onStreamStateChanged onStreamStateChanged}, see {@link ErrorCode ErrorCode} for the reasons.
3050
+ * - Calling this API to update the subscribe configuration when the user has subscribed the remote user either by calling this API or by auto-subscribe.
3051
+ * - You must first get the remote stream information through onUserPublishScreenAudio{@link #IRTCRoomEventHandler#onUserPublishScreenAudio} before calling this API to subscribe to streams accordingly.
3052
+ * - After calling this API, you will be informed of the calling result with onScreenAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenAudioSubscribeStateChanged}.
3053
+ * - 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 subscribeScreenAudio{@link #RTCRoom#subscribeScreenAudio}.
3054
+ * - Any other exceptions will be included in onScreenAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenAudioSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
3044
3055
  *
3045
3056
  */
3046
- unsubscribeScreen(uid: string, type: MediaStreamType): Promise<number>;
3057
+ subscribeScreenAudio(userId: string, subscribe: boolean): number;
3047
3058
  /** {en}
3048
3059
  * @detail api
3049
3060
  * @region Multi-room