@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
@@ -251,16 +251,160 @@ export declare class RTCRoom {
251
251
  sendRoomBinaryMessage(buffer: ArrayBuffer): long;
252
252
  setMultiDeviceAVSync(audioUserId: String): int;
253
253
  setRemoteVideoConfig(userId: String, remoteVideoConfig: RemoteVideoConfig): int;
254
- publishStream(type: MediaStreamType): int;
255
- unpublishStream(type: MediaStreamType): int;
256
- publishScreen(type: MediaStreamType): int;
257
- unpublishScreen(type: MediaStreamType): int;
258
- subscribeStream(uid: String, type: MediaStreamType): int;
254
+ /** {en}
255
+ * @detail api
256
+ * @valid since 3.60.
257
+ * @brief Start or stop publishing video streams captured by camera in the current room.
258
+ * @param publish Whether to publish the media stream.
259
+ * @return
260
+ * - 0: Success.
261
+ * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
262
+ * @note
263
+ * - You don't need to call this API if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}.
264
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room.
265
+ * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) and/or publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop screen sharing.
266
+ * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
267
+ * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
268
+ * - 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.
269
+ *
270
+ */
271
+ publishStreamVideo(publish: boolean): int;
272
+ /** {en}
273
+ * @detail api
274
+ * @valid since 3.60.
275
+ * @brief Start or stop publishing media streams captured by the local microphone in the current room.
276
+ * @param publish Whether to publish the media stream.
277
+ * @return
278
+ * - 0: Success.
279
+ * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
280
+ * @note
281
+ * - You don't need to call this API if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}.
282
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room.
283
+ * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) and/or publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop screen sharing.
284
+ * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
285
+ * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
286
+ * - 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.
287
+ *
288
+ */
289
+ publishStreamAudio(publish: boolean): int;
290
+ /** {en}
291
+ * @detail api
292
+ * @valid since 3.60.
293
+ * @brief Start or stop sharing the local screen in the room.
294
+ * 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.
295
+ * @param publish Whether to publish video stream.
296
+ * @return
297
+ * - 0: Success.
298
+ * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
299
+ * @note
300
+ * - You need to call this API to publish screen even if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}.
301
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room.
302
+ * - Call publishScreenAudio{@link #RTCRoom#publishScreenAudio} (not supported on Linux) to start or stop sharing computer audio.
303
+ * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
304
+ * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
305
+ * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
306
+ * - 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.
307
+ * - After calling this API, you'll receive onScreenVideoFrameSendStateChanged{@link #IRTCEngineEventHandler#onScreenVideoFrameSendStateChanged}.
308
+ * - Refer to [Sharing Screen in PC](https://docs.byteplus.com/byteplus-rtc/docs/70144) for more information.
309
+ *
310
+ */
311
+ publishScreenVideo(publish: boolean): int;
312
+ /** {en}
313
+ * @hidden(Linux)
314
+ * @detail api
315
+ * @valid since 3.60.
316
+ * @brief Manually publishes local screen-sharing streams in the current room. <br>
317
+ * 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.
318
+ * @param publish Media stream type, used for specifying whether to publish audio stream or video stream.
319
+ * @return
320
+ * - 0: Success.
321
+ * - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
322
+ * @note
323
+ * - You need to call this API to publish screen even if you set it to Auto-publish when calling joinRoom{@link #RTCRoom#joinRoom}.
324
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #RTCRoom#setUserVisibility} to change your visibility in the room.
325
+ * - Call publishScreenVideo{@link #RTCRoom#publishScreenVideo} to start or stop sharing the local screen.
326
+ * - Call publishStreamVideo{@link #RTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
327
+ * - Call publishStreamAudio{@link #RTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
328
+ * - Call startForwardStreamToRooms{@link #RTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
329
+ * - 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.
330
+ * - Refer to [Sharing Screen in PC](https://docs.byteplus.com/byteplus-rtc/docs/70144) for more information.
331
+ *
332
+ */
333
+ publishScreenAudio(publish: boolean): int;
334
+ /** {en}
335
+ * @detail api
336
+ * @valid since 3.60.
337
+ * @brief Subscribes to specific remote media streams captured by the local camera. Or update the subscribe options of the subscribed user.
338
+ * @param userId The ID of the remote user who published the target video stream.
339
+ * @param subscribe Whether to subscribe to the stream.
340
+ * @return API call result: <br>
341
+ * - 0: Success.
342
+ * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons.
343
+ * @note
344
+ * - 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.
345
+ * - You must first get the remote stream information through onUserPublishStreamVideo{@link #IRTCRoomEventHandler#onUserPublishStreamVideo} before calling this API to subscribe to streams accordingly.
346
+ * - After calling this API, you will be informed of the calling result with onVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onVideoSubscribeStateChanged}.
347
+ * - 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}.
348
+ * - Any other exceptions will be included in onVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onVideoSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
349
+ *
350
+ */
351
+ subscribeStreamVideo(userId: String, subscribe: boolean): int;
352
+ /** {en}
353
+ * @detail api
354
+ * @valid since 3.60.
355
+ * @brief Subscribes to specific remote media streams captured by the local microphone. Or update the subscribe options of the subscribed user.
356
+ * @param userId The ID of the remote user who published the target media stream.
357
+ * @param subscribe Whether to subscribe to the audio stream.
358
+ * @return API call result: <br>
359
+ * - 0: Success.
360
+ * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons.
361
+ * @note
362
+ * - 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.
363
+ * - You must first get the remote stream information through onUserPublishStreamAudio{@link #IRTCRoomEventHandler#onUserPublishStreamAudio} before calling this API to subscribe to streams accordingly.
364
+ * - After calling this API, you will be informed of the calling result with onAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onAudioSubscribeStateChanged}.
365
+ * - 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}.
366
+ * - Any other exceptions will be included in onAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onAudioSubscribeStateChanged}, see ErrorCode{@link #ErrorCode} for the reasons.
367
+ *
368
+ */
369
+ subscribeStreamAudio(userId: String, subscribe: boolean): int;
370
+ /** {en}
371
+ * @detail api
372
+ * @valid since 3.60.
373
+ * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user.
374
+ * @param userId The ID of the remote user who published the target screen video stream.
375
+ * @param subscribe Whether to subscribe to the screen video stream.
376
+ * @return API call result: <br>
377
+ * - 0: Success.
378
+ * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons.
379
+ * @note
380
+ * - 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.
381
+ * - You must first get the remote stream information through onUserPublishScreenVideo{@link #IRTCRoomEventHandler#onUserPublishScreenVideo} before calling this API to subscribe to streams accordingly.
382
+ * - After calling this API, you will be informed of the calling result with onScreenVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenVideoSubscribeStateChanged}.
383
+ * - 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}.
384
+ * - Any other exceptions will be included in onScreenVideoSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenVideoSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
385
+ *
386
+ */
387
+ subscribeScreenVideo(userId: String, subscribe: boolean): int;
388
+ /** {en}
389
+ * @detail api
390
+ * @valid since 3.60.
391
+ * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user.
392
+ * @param userId The ID of the remote user who published the target screen audio stream.
393
+ * @param subscribe Whether to subscribe to the screen audio stream.
394
+ * @return API call result: <br>
395
+ * - 0: Success.
396
+ * - <0: Failure. See ReturnStatus{@link #ReturnStatus} for specific reasons.
397
+ * @note
398
+ * - 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.
399
+ * - You must first get the remote stream information through onUserPublishScreenAudio{@link #IRTCRoomEventHandler#onUserPublishScreenAudio} before calling this API to subscribe to streams accordingly.
400
+ * - After calling this API, you will be informed of the calling result with onScreenAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenAudioSubscribeStateChanged}.
401
+ * - 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}.
402
+ * - Any other exceptions will be included in onScreenAudioSubscribeStateChanged{@link #IRTCRoomEventHandler#onScreenAudioSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
403
+ *
404
+ */
405
+ subscribeScreenAudio(userId: String, subscribe: boolean): int;
259
406
  subscribeAllStreams(type: MediaStreamType): int;
260
- unsubscribeStream(uid: String, type: MediaStreamType): int;
261
407
  unsubscribeAllStreams(type: MediaStreamType): int;
262
- subscribeScreen(uid: String, type: MediaStreamType): int;
263
- unsubscribeScreen(uid: String, type: MediaStreamType): int;
264
408
  pauseAllSubscribedStream(mediaType: PauseResumeControlMediaType): int;
265
409
  resumeAllSubscribedStream(mediaType: PauseResumeControlMediaType): int;
266
410
  startForwardStreamToRooms(forwardStreamInfos: List<ForwardStreamInfo>): int;
@@ -1,7 +1,7 @@
1
1
  // Copyright © 2022 BytePlusRTC All rights reserved.
2
2
  // SPDX-License-Identifier: MIT
3
3
 
4
- import { RTCRoomStats, AVSyncState, UserInfo, MediaStreamType, StreamRemoveReason, LocalStreamStats, RemoteStreamStats, SubscribeConfig, ForwardStreamStateInfo, ForwardStreamEventInfo, NetworkQualityStats, SetRoomExtraInfoResult, UserVisibilityChangeError, SubtitleState, SubtitleMessage, RTCStream, PlayState, KTVPlayerErrorCode, PlayerState, PlayerError, RemoteStreamKey, RTCEncodedVideoFrame, MusicInfo, HotMusicInfo, DownloadResult, SingScoringRealtimeInfo, FaceDetectionResult, ByteRTCStreamMixingEvent, MixedStreamType, VideoFrame, IAudioFrame, ByteRTCStreamMixingType, StreamIndex, MediaPlayerCustomSourceSeekWhence, SysStats, LocalAudioStreamState, LocalAudioStreamError, RemoteAudioState, RemoteAudioStateChangeReason, LocalVideoStreamState, LocalVideoStreamError, RemoteVideoState, RemoteVideoStateChangeReason, VideoSuperResolutionMode, VideoSuperResolutionModeChangedReason, VideoDenoiseMode, VideoDenoiseModeChangedReason, VideoFrameInfo, AudioRoute, SEIStreamUpdateEvent, NetworkDetectionLinkType, NetworkDetectionStopReason, RemoteStreamSwitch, PerformanceAlarmMode, PerformanceAlarmReason, SourceWantedData, RtcUser, FirstFrameSendState, FirstFramePlayState, AudioDeviceType, VideoDeviceType, RecordingState, RecordingErrorCode, RecordingInfo, RecordingProgress, AudioRecordingState, LocalAudioPropertiesInfo, RemoteAudioPropertiesInfo, SyncInfoStreamType, DataMessageSourceType, EchoTestResult, HardwareEchoDetectionResult, LocalProxyType, LocalProxyState, LocalProxyError, MuteState, AudioPlaybackDevice, AudioMixingState, AudioMixingError } from './keytype';
4
+ import { RTCRoomStats, AVSyncState, UserInfo, StreamRemoveReason, LocalStreamStats, RemoteStreamStats, SubscribeConfig, ForwardStreamStateInfo, ForwardStreamEventInfo, NetworkQualityStats, SetRoomExtraInfoResult, UserVisibilityChangeError, SubtitleState, SubtitleMessage, RTCStream, PlayState, KTVPlayerErrorCode, PlayerState, PlayerError, RemoteStreamKey, RTCEncodedVideoFrame, MusicInfo, HotMusicInfo, DownloadResult, SingScoringRealtimeInfo, FaceDetectionResult, ByteRTCStreamMixingEvent, MixedStreamType, VideoFrame, IAudioFrame, ByteRTCStreamMixingType, StreamIndex, MediaPlayerCustomSourceSeekWhence, SysStats, LocalAudioStreamState, LocalAudioStreamError, RemoteAudioState, RemoteAudioStateChangeReason, LocalVideoStreamState, LocalVideoStreamError, RemoteVideoState, RemoteVideoStateChangeReason, VideoSuperResolutionMode, VideoSuperResolutionModeChangedReason, VideoDenoiseMode, VideoDenoiseModeChangedReason, VideoFrameInfo, AudioRoute, SEIStreamUpdateEvent, NetworkDetectionLinkType, NetworkDetectionStopReason, RemoteStreamSwitch, PerformanceAlarmMode, PerformanceAlarmReason, SourceWantedData, RtcUser, FirstFrameSendState, FirstFramePlayState, AudioDeviceType, VideoDeviceType, RecordingState, RecordingErrorCode, RecordingInfo, RecordingProgress, AudioRecordingState, LocalAudioPropertiesInfo, RemoteAudioPropertiesInfo, SyncInfoStreamType, DataMessageSourceType, EchoTestResult, HardwareEchoDetectionResult, LocalProxyType, LocalProxyState, LocalProxyError, MuteState, AudioPlaybackDevice, AudioMixingState, AudioMixingError, PublishState, PublishStateChangeReason, SubscribeState, SubscribeStateChangeReason } from './keytype';
5
5
  import { String, int, ByteBuffer, long, JSONObject, double, Bitmap } from './types';
6
6
  import { SubtitleErrorCode, ByteRTCStreamSinglePushEvent, KTVErrorCode, ByteRTCTranscoderErrorCode, AudioRecordingErrorCode, PublicStreamErrorCode } from './errorcode';
7
7
  export declare class IRTCRoomEventHandler {
@@ -15,10 +15,18 @@ export declare class IRTCRoomEventHandler {
15
15
  onTokenWillExpire?(): void;
16
16
  onPublishPrivilegeTokenWillExpire?(): void;
17
17
  onSubscribePrivilegeTokenWillExpire?(): void;
18
- onUserPublishStream?(uid: String, type: MediaStreamType): void;
19
- onUserUnpublishStream?(uid: String, type: MediaStreamType, reason: StreamRemoveReason): void;
20
- onUserPublishScreen?(uid: String, type: MediaStreamType): void;
21
- onUserUnpublishScreen?(uid: String, type: MediaStreamType, reason: StreamRemoveReason): void;
18
+ onUserPublishStreamVideo?(roomId: String, uid: String, isPublish: boolean): void;
19
+ onUserPublishStreamAudio?(roomId: String, uid: String, isPublish: boolean): void;
20
+ onUserPublishScreenVideo?(roomId: String, uid: String, isPublish: boolean): void;
21
+ onUserPublishScreenAudio?(roomId: String, uid: String, isPublish: boolean): void;
22
+ onVideoPublishStateChanged?(roomId: String, uid: String, state: PublishState, reason: PublishStateChangeReason): void;
23
+ onAudioPublishStateChanged?(roomId: String, uid: String, state: PublishState, reason: PublishStateChangeReason): void;
24
+ onScreenVideoPublishStateChanged?(roomId: String, uid: String, state: PublishState, reason: PublishStateChangeReason): void;
25
+ onScreenAudioPublishStateChanged?(roomId: String, uid: String, state: PublishState, reason: PublishStateChangeReason): void;
26
+ onVideoSubscribeStateChanged?(roomId: String, uid: String, state: SubscribeState, reason: SubscribeStateChangeReason): void;
27
+ onAudioSubscribeStateChanged?(roomId: String, uid: String, state: SubscribeState, reason: SubscribeStateChangeReason): void;
28
+ onScreenVideoSubscribeStateChanged?(roomId: String, uid: String, state: SubscribeState, reason: SubscribeStateChangeReason): void;
29
+ onScreenAudioSubscribeStateChanged?(roomId: String, uid: String, state: SubscribeState, reason: SubscribeStateChangeReason): void;
22
30
  onLocalStreamStats?(stats: LocalStreamStats): void;
23
31
  onRemoteStreamStats?(stats: RemoteStreamStats): void;
24
32
  onStreamSubscribed?(stateCode: int, userId: String, info: SubscribeConfig): void;
@@ -503,11 +503,49 @@ export declare enum RemoteMirrorType {
503
503
  NONE = 0,
504
504
  RENDER = 1
505
505
  }
506
+ export declare enum PublishStateChangeReason {
507
+ PUBLISH = 0,
508
+ UNPUBLISH = 1,
509
+ NO_PUBLISH_PERMISSION = 2,
510
+ OVER_STREAM_PUBLISH_LIMIT = 3,
511
+ MULTIROOM_UNPUBLISH_FAILED = 4,
512
+ PUBLISH_STREAM_FAILED = 5,
513
+ PUBLISH_STREAM_FORBIDEN = 6,
514
+ USER_IN_PUBLISH = 7
515
+ }
516
+ export declare enum PublishState {
517
+ /** {en}
518
+ * @brief Successfully published.
519
+ *
520
+ */
521
+ PUBLISHED = 0,
522
+ /** {en}
523
+ * @brief Failed to publish.
524
+ *
525
+ */
526
+ UNPUBLISHED = 1
527
+ }
528
+ export declare enum SubscribeStateChangeReason {
529
+ SUBSCRIBE = 0,
530
+ UNSUBSCRIBE = 1,
531
+ REMOTE_PUBLISH = 2,
532
+ REMOTE_UNPUBLISH = 3,
533
+ STREAM_FAILED_5XX = 4,
534
+ STREAM_FAILED_404 = 5,
535
+ OVER_STREAM_SUBSCRIBE_LIMIT = 6,
536
+ NO_SUBSCRIBE_PERMISSION = 7
537
+ }
506
538
  export declare enum SubscribeState {
507
- SUBSCRIBE_STATE_SUCCESS = 0,
508
- SUBSCRIBE_STATE_FAILED_NOT_IN_ROOM = 1,
509
- SUBSCRIBE_STATE_FAILED_STREAM_NOT_FOUND = 2,
510
- SUBSCRIBE_STATE_FAILED_SIGNAL = 4
539
+ /** {en}
540
+ * @brief Successfully subscribed.
541
+ *
542
+ */
543
+ SUBSCRIBED = 0,
544
+ /** {en}
545
+ * @brief Failed to subscribe.
546
+ *
547
+ */
548
+ UNSUBSCRIBED = 1
511
549
  }
512
550
  export declare class VirtualBackgroundSource {
513
551
  sourceType: VirtualBackgroundSourceType;
@@ -726,13 +764,44 @@ export declare enum AVSyncState {
726
764
  AV_SYNC_STATE_VIDEO_STREAM_REMOVE = 2
727
765
  }
728
766
  export declare class RTCRoomConfig {
729
- constructor(channelProfile: ChannelProfile, isAutoPublish: boolean, isAutoSubscribeAudio: boolean, isAutoSubscribeVideo: boolean, remoteVideoConfig: RemoteVideoConfig);
730
- constructor(channelProfile: ChannelProfile, isAutoPublish: boolean, isAutoSubscribeAudio: boolean, isAutoSubscribeVideo: boolean);
767
+ constructor(channelProfile: ChannelProfile, isPublishAudio: boolean, isPublishVideo: boolean, isAutoSubscribeAudio: boolean, isAutoSubscribeVideo: boolean, remoteVideoConfig: RemoteVideoConfig);
768
+ /** {en}
769
+ * @brief Room profile. See ChannelProfile{@link #ChannelProfile}. The default is `CHANNEL_PROFILE_COMMUNICATION`. The setting cannot be changed after joining the room.
770
+ *
771
+ */
731
772
  profile: ChannelProfile;
732
- isAutoPublish: boolean;
773
+ /** {en}
774
+ * @brief Whether to publish media streams automatically. The default is automatic publishing.
775
+ * + Changing the user role to audience via `setUserVisibility` will void this setting.
776
+ * + 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.
777
+ *
778
+ */
779
+ isPublishAudio: boolean;
780
+ /** {en}
781
+ * @brief Whether to publish media streams automatically. The default is automatic publishing.
782
+ * + Changing the user role to audience via `setUserVisibility` will void this setting.
783
+ * + 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.
784
+ *
785
+ */
786
+ isPublishVideo: boolean;
787
+ /** {en}
788
+ * @brief Whether to automatically subscribe to the audio stream. The default is automatic subscription. <br>
789
+ * This setting affects both the main stream and the screen-sharing stream.
790
+ *
791
+ */
733
792
  isAutoSubscribeAudio: boolean;
793
+ /** {en}
794
+ * @brief Whether to automatically subscribe to the main video stream. The default is automatic subscription. <br>
795
+ * This setting affects both the main stream and the screen-sharing stream.
796
+ *
797
+ */
734
798
  isAutoSubscribeVideo: boolean;
799
+ /** {en}
800
+ * @brief Expected configuration of remote video stream, see RemoteVideoConfig{@link #RemoteVideoConfig}.
801
+ *
802
+ */
735
803
  remoteVideoConfig: RemoteVideoConfig;
804
+ isPublishAudio$(): boolean;
736
805
  }
737
806
  export declare enum SVCLayer {
738
807
  DEFAULT = 0,
@@ -1928,12 +1997,41 @@ export declare enum MediaStreamType {
1928
1997
  RTC_MEDIA_STREAM_TYPE_BOTH = 3
1929
1998
  }
1930
1999
  export declare enum MediaDeviceState {
2000
+ /** {en}
2001
+ * @brief Device started capturing
2002
+ *
2003
+ */
1931
2004
  MEDIA_DEVICE_STATE_STARTED = 1,
2005
+ /** {en}
2006
+ * @brief Device stopped capturing
2007
+ *
2008
+ */
1932
2009
  MEDIA_DEVICE_STATE_STOPPED = 2,
2010
+ /** {en}
2011
+ * @brief Runtime error <br>
2012
+ * For example, when the media device is expected to be working but no data is received.
2013
+ *
2014
+ */
1933
2015
  MEDIA_DEVICE_STATE_RUNTIMEERROR = 3,
2016
+ /** {en}
2017
+ * @brief Device is added.
2018
+ *
2019
+ */
1934
2020
  MEDIA_DEVICE_STATE_ADDED = 10,
2021
+ /** {en}
2022
+ * @brief Device is removed.
2023
+ *
2024
+ */
1935
2025
  MEDIA_DEVICE_STATE_REMOVED = 11,
2026
+ /** {en}
2027
+ * @brief A Phone call interrupted the RTC call. RTC call will resume once the call ends.
2028
+ *
2029
+ */
1936
2030
  MEDIA_DEVICE_STATE_INTERRUPTION_BEGAN = 12,
2031
+ /** {en}
2032
+ * @brief RTC call resumed from the interruption caused by a phone call.
2033
+ *
2034
+ */
1937
2035
  MEDIA_DEVICE_STATE_INTERRUPTION_ENDED = 13
1938
2036
  }
1939
2037
  export declare class Layout$Region {
@@ -112,24 +112,160 @@ export declare class ByteRTCRoom {
112
112
  leaveRoom(): int;
113
113
  updateToken(token: NSString): int;
114
114
  setRemoteVideoConfig(userId: NSString, remoteVideoConfig: ByteRTCRemoteVideoConfig): int;
115
- publishStream(type: ByteRTCMediaStreamType): int;
116
- publishStreamVideo(enable: bool): int;
117
- publishStreamAudio(enable: bool): int;
118
- subscribeStreamVideo(userId: NSString, enable: bool): int;
119
- subscribeStreamAudio(userId: NSString, enable: bool): int;
120
- publishScreenVideo(enable: bool): int;
121
- publishScreenAudio(enable: bool): int;
122
- subscribeScreenVideo(userId: NSString, enable: bool): int;
123
- subscribeScreenAudio(userId: NSString, enable: bool): int;
124
- unpublishStream(type: ByteRTCMediaStreamType): int;
125
- publishScreen(type: ByteRTCMediaStreamType): int;
126
- unpublishScreen(type: ByteRTCMediaStreamType): int;
127
- subscribeStream(userId: NSString, mediaStreamType: ByteRTCMediaStreamType): int;
115
+ /** {en}
116
+ * @detail api
117
+ * @valid since 3.60.
118
+ * @brief Start or stop publishing video streams captured by camera in the current room.
119
+ * @param publish Whether to publish the media stream.
120
+ * @return
121
+ * - 0: Success.
122
+ * - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
123
+ * @note
124
+ * - You don't need to call this API if you set it to Auto-publish when calling joinRoom:userInfo:roomConfig:{@link #ByteRTCRoom#joinRoom:userInfo:roomConfig}.
125
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #IRTCRoom#setUserVisibility} to change your visibility in the room.
126
+ * - Call publishScreenAudio:{@link #ByteRTCRoom#publishScreenAudio} (not supported on Linux) and/or publishScreenVideo:{@link #ByteRTCRoom#publishScreenVideo} to start or stop screen sharing.
127
+ * - Call publishStreamAudio:{@link #ByteRTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
128
+ * - Call startForwardStreamToRooms:{@link #ByteRTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
129
+ * - After you call this API, the other users in the room will receive rtcRoom:onUserPublishStreamVideo:uid:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishStreamVideo:uid:isPublish}. Those who successfully received your streams will receive rtcEngine:onFirstRemoteVideoFrameDecoded:withFrameInfo:{@link #ByteRTCRoomDelegate#rtcEngine:onFirstRemoteVideoFrameDecoded:withFrameInfo} at the same time.
130
+ *
131
+ */
132
+ publishStreamVideo(publish: BOOL): int;
133
+ /** {en}
134
+ * @detail api
135
+ * @valid since 3.60.
136
+ * @brief Start or stop publishing media streams captured by the local microphone in the current room.
137
+ * @param publish Whether to publish the media stream.
138
+ * @return
139
+ * - 0: Success.
140
+ * - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
141
+ * @note
142
+ * - You don't need to call this API if you set it to Auto-publish when calling joinRoom:userInfo:roomConfig:{@link #ByteRTCRoom#joinRoom:userInfo:roomConfig}.
143
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #IRTCRoom#setUserVisibility} to change your visibility in the room.
144
+ * - Call publishScreenAudio:{@link #ByteRTCRoom#publishScreenAudio} (not supported on Linux) and/or publishScreenVideo:{@link #ByteRTCRoom#publishScreenVideo} to start or stop screen sharing.
145
+ * - Call publishStreamVideo:{@link #ByteRTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
146
+ * - Call startForwardStreamToRooms:{@link #ByteRTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
147
+ * - After you call this API, the other users in the room will receive rtcRoom:onUserPublishStreamAudio:uid:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishStreamAudio:uid:isPublish}. Those who successfully received your streams will receive rtcEngine:onFirstRemoteAudioFrame:{@link #ByteRTCEngineDelegate#rtcEngine:onFirstRemoteAudioFrame} at the same time.
148
+ *
149
+ */
150
+ publishStreamAudio(publish: BOOL): int;
151
+ /** {en}
152
+ * @detail api
153
+ * @valid since 3.60.
154
+ * @brief Start or stop sharing the local screen in the room.
155
+ * 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.
156
+ * @param publish Whether to publish video stream.
157
+ * @return
158
+ * - 0: Success.
159
+ * - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
160
+ * @note
161
+ * - You need to call this API to publish screen even if you set it to Auto-publish when calling joinRoom:userInfo:roomConfig:{@link #ByteRTCRoom#joinRoom:userInfo:roomConfig}.
162
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #IRTCRoom#setUserVisibility} to change your visibility in the room.
163
+ * - Call publishScreenAudio:{@link #ByteRTCRoom#publishScreenAudio} (not supported on Linux) to start or stop sharing computer audio.
164
+ * - Call publishStreamVideo:{@link #ByteRTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
165
+ * - Call publishStreamAudio:{@link #ByteRTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
166
+ * - Call startForwardStreamToRooms:{@link #ByteRTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
167
+ * - After you called this API, the other users in the room will receive rtcRoom:onUserPublishScreenVideo:uid:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishScreenVideo:uid:isPublish}. Those who successfully received your streams will receive rtcEngine:onFirstRemoteVideoFrameDecoded:withFrameInfo:{@link #ByteRTCRoomDelegate#rtcEngine:onFirstRemoteVideoFrameDecoded:withFrameInfo} at the same time.
168
+ * - After calling this API, you'll receive rtcEngine:onScreenVideoFrameSendStateChanged:rtcUser:state:{@link #ByteRTCEngineDelegate#rtcEngine:onScreenVideoFrameSendStateChanged:rtcUser:state}.
169
+ * - Refer to [Sharing Screen in PC](https://docs.byteplus.com/byteplus-rtc/docs/70144) for more information.
170
+ *
171
+ */
172
+ publishScreenVideo(publish: BOOL): int;
173
+ /** {en}
174
+ * @hidden(Linux)
175
+ * @detail api
176
+ * @valid since 3.60.
177
+ * @brief Manually publishes local screen-sharing streams in the current room. <br>
178
+ * 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.
179
+ * @param publish Media stream type, used for specifying whether to publish audio stream or video stream.
180
+ * @return
181
+ * - 0: Success.
182
+ * - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details
183
+ * @note
184
+ * - You need to call this API to publish screen even if you set it to Auto-publish when calling joinRoom:userInfo:roomConfig:{@link #ByteRTCRoom#joinRoom:userInfo:roomConfig}.
185
+ * - An invisible user cannot publish media streams. Call setUserVisibility{@link #IRTCRoom#setUserVisibility} to change your visibility in the room.
186
+ * - Call publishScreenVideo:{@link #ByteRTCRoom#publishScreenVideo} to start or stop sharing the local screen.
187
+ * - Call publishStreamVideo:{@link #ByteRTCRoom#publishStreamVideo} to start or stop publishing the video stream captured by the camera.
188
+ * - Call publishStreamAudio:{@link #ByteRTCRoom#publishStreamAudio} to start or stop publishing the audio stream captured by the microphone.
189
+ * - Call startForwardStreamToRooms:{@link #ByteRTCRoom#startForwardStreamToRooms} to forward the published streams to the other rooms.
190
+ * - After you called this API, the other users in the room will receive rtcRoom:onUserPublishScreenAudio:uid:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishScreenAudio:uid:isPublish}. Those who successfully received your streams will receive rtcEngine:onFirstRemoteAudioFrame:{@link #ByteRTCEngineDelegate#rtcEngine:onFirstRemoteAudioFrame} at the same time.
191
+ * - Refer to [Sharing Screen in PC](https://docs.byteplus.com/byteplus-rtc/docs/70144) for more information.
192
+ *
193
+ */
194
+ publishScreenAudio(publish: BOOL): int;
195
+ /** {en}
196
+ * @detail api
197
+ * @valid since 3.60.
198
+ * @brief Subscribes to specific remote media streams captured by the local camera. Or update the subscribe options of the subscribed user.
199
+ * @param userId The ID of the remote user who published the target video stream.
200
+ * @param subscribe Whether to subscribe to the stream.
201
+ * @return API call result: <br>
202
+ * - 0: Success.
203
+ * - <0: Failure. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for specific reasons.
204
+ * @note
205
+ * - 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.
206
+ * - You must first get the remote stream information through rtcRoom:onUserPublishStreamVideo:uid:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishStreamVideo:uid:isPublish} before calling this API to subscribe to streams accordingly.
207
+ * - After calling this API, you will be informed of the calling result with onVideoSubscribeStateChanged{@link #ByteRTCRoomDelegate#onVideoSubscribeStateChanged}.
208
+ * - 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 #IRTCRoom#subscribeStreamVideo}.
209
+ * - Any other exceptions will be included in onVideoSubscribeStateChanged{@link #ByteRTCRoomDelegate#onVideoSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
210
+ *
211
+ */
212
+ subscribeStreamVideo(userId: NSString, subscribe: BOOL): int;
213
+ /** {en}
214
+ * @detail api
215
+ * @valid since 3.60.
216
+ * @brief Subscribes to specific remote media streams captured by the local microphone. Or update the subscribe options of the subscribed user.
217
+ * @param userId The ID of the remote user who published the target media stream.
218
+ * @param subscribe Whether to subscribe to the audio stream.
219
+ * @return API call result: <br>
220
+ * - 0: Success.
221
+ * - <0: Failure. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for specific reasons.
222
+ * @note
223
+ * - 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.
224
+ * - You must first get the remote stream information through rtcRoom:onUserPublishStreamAudio:uid:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishStreamAudio:uid:isPublish} before calling this API to subscribe to streams accordingly.
225
+ * - After calling this API, you will be informed of the calling result with onAudioSubscribeStateChanged{@link #ByteRTCRoomDelegate#onAudioSubscribeStateChanged}.
226
+ * - 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 #IRTCRoom#subscribeStreamAudio}.
227
+ * - Any other exceptions will be included in onAudioSubscribeStateChanged{@link #ByteRTCRoomDelegate#onAudioSubscribeStateChanged}, see ErrorCode{@link #ErrorCode} for the reasons.
228
+ *
229
+ */
230
+ subscribeStreamAudio(userId: NSString, subscribe: BOOL): int;
231
+ /** {en}
232
+ * @detail api
233
+ * @valid since 3.60.
234
+ * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user.
235
+ * @param userId The ID of the remote user who published the target screen video stream.
236
+ * @param subscribe Whether to subscribe to the screen video stream.
237
+ * @return API call result: <br>
238
+ * - 0: Success.
239
+ * - <0: Failure. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for specific reasons.
240
+ * @note
241
+ * - 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.
242
+ * - You must first get the remote stream information through rtcRoom:onUserPublishScreenVideo:uid:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishScreenVideo:uid:isPublish} before calling this API to subscribe to streams accordingly.
243
+ * - After calling this API, you will be informed of the calling result with onScreenVideoSubscribeStateChanged{@link #ByteRTCRoomDelegate#onScreenVideoSubscribeStateChanged}.
244
+ * - 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 #IRTCRoom#subscribeScreenVideo}.
245
+ * - Any other exceptions will be included in onScreenVideoSubscribeStateChanged{@link #ByteRTCRoomDelegate#onScreenVideoSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
246
+ *
247
+ */
248
+ subscribeScreenVideo(userId: NSString, subscribe: BOOL): int;
249
+ /** {en}
250
+ * @detail api
251
+ * @valid since 3.60.
252
+ * @brief Subscribes to specific screen sharing media stream. Or update the subscribe options of the subscribed user.
253
+ * @param userId The ID of the remote user who published the target screen audio stream.
254
+ * @param subscribe Whether to subscribe to the screen audio stream.
255
+ * @return API call result: <br>
256
+ * - 0: Success.
257
+ * - <0: Failure. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for specific reasons.
258
+ * @note
259
+ * - 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.
260
+ * - You must first get the remote stream information through rtcRoom:onUserPublishScreenAudio:uid:isPublish:{@link #ByteRTCRoomDelegate#rtcRoom:onUserPublishScreenAudio:uid:isPublish} before calling this API to subscribe to streams accordingly.
261
+ * - After calling this API, you will be informed of the calling result with onScreenAudioSubscribeStateChanged{@link #ByteRTCRoomDelegate#onScreenAudioSubscribeStateChanged}.
262
+ * - 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 #IRTCRoom#subscribeScreenAudio}.
263
+ * - Any other exceptions will be included in onScreenAudioSubscribeStateChanged{@link #ByteRTCRoomDelegate#onScreenAudioSubscribeStateChanged}, see SubscribeStateChangeReason{@link #SubscribeStateChangeReason} for the reasons.
264
+ *
265
+ */
266
+ subscribeScreenAudio(userId: NSString, subscribe: BOOL): int;
128
267
  subscribeAllStreamsWithMediaStreamType(mediaStreamType: ByteRTCMediaStreamType): int;
129
- unsubscribeStream(userId: NSString, mediaStreamType: ByteRTCMediaStreamType): int;
130
268
  unsubscribeAllStreamsWithMediaStreamType(mediaStreamType: ByteRTCMediaStreamType): int;
131
- subscribeScreen(userId: NSString, mediaStreamType: ByteRTCMediaStreamType): int;
132
- unsubscribeScreen(userId: NSString, mediaStreamType: ByteRTCMediaStreamType): int;
133
269
  pauseAllSubscribedStream(mediaType: ByteRTCPauseResumControlMediaType): int;
134
270
  resumeAllSubscribedStream(mediaType: ByteRTCPauseResumControlMediaType): int;
135
271
  sendUserMessage(userId: NSString, message: NSString, config: ByteRTCMessageConfig): NSInteger;