@byteplus/rtc 4.60.11 → 4.61.1
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.
- package/extension-beauty/index.js +2 -3
- package/extension-beauty/index.umd.js +2 -3
- package/index.d.ts +331 -173
- package/index.esm.min.js +3 -4
- package/index.min.js +2 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { EventArgs, EventEmitter, EventNames, ValidEventTypes } from 'eventemitt
|
|
|
4
4
|
|
|
5
5
|
declare class EnhancedEventEmitter<EventTypes extends ValidEventTypes = string | symbol> extends EventEmitter<EventTypes> {
|
|
6
6
|
safeEmit<T extends EventNames<EventTypes>>(event: T, ...args: EventArgs<EventTypes, T>): boolean;
|
|
7
|
+
asyncEmit<T extends EventNames<EventTypes>>(event: T, ...args: EventArgs<EventTypes, T>): Promise<void>;
|
|
7
8
|
}
|
|
8
9
|
declare class VERTC implements IVERTC {
|
|
9
10
|
getSdkVersion: () => string;
|
|
@@ -64,6 +65,7 @@ declare const Config: {
|
|
|
64
65
|
FALLBACK_ENCODE_CODEC: string;
|
|
65
66
|
SEI_TIME_OUT: number;
|
|
66
67
|
SEI_COUNT_FPS: number;
|
|
68
|
+
PRE_ICE: boolean;
|
|
67
69
|
};
|
|
68
70
|
declare const _default: VERTC;
|
|
69
71
|
declare enum AudioMixingError {
|
|
@@ -775,7 +777,7 @@ declare enum ErrorCode {
|
|
|
775
777
|
|
|
776
778
|
/**
|
|
777
779
|
* @hidden
|
|
778
|
-
* @brief Subtitles are already on. There is no need to call [startSubtitle](104478#startsubtitle) again.
|
|
780
|
+
* @brief Subtitles are already on. There is no need to call [startSubtitle](docs-104478#startsubtitle) again.
|
|
779
781
|
*/
|
|
780
782
|
SUBTITLE_ALREADY_ON = "SUBTITLE_ALREADY_ON",
|
|
781
783
|
|
|
@@ -828,13 +830,13 @@ declare enum SEIStreamEventType {
|
|
|
828
830
|
|
|
829
831
|
/**
|
|
830
832
|
* @brief A black frame video stream is published from the remote user.
|
|
831
|
-
* In the voice call scenario, when a remote user sends SEI data by calling [sendSEIMessage](104478#sendseimessage), the SDK will publish a black frame video stream and trigger this callback.
|
|
833
|
+
* In the voice call scenario, when a remote user sends SEI data by calling [sendSEIMessage](docs-104478#sendseimessage), the SDK will publish a black frame video stream and trigger this callback.
|
|
832
834
|
*/
|
|
833
835
|
BLACK = 0,
|
|
834
836
|
|
|
835
837
|
/**
|
|
836
838
|
* @brief The black frame video stream is removed. The triggers for this callback include:
|
|
837
|
-
* <ul><li> When the remote user starts camera capture, switching from voice call to video call, the black frame video stream stops publishing. </li><li> When the remote user calls [setVideoSourceType](104478#setvideosourcetype) to switch to custom video capture, black frame video stream stops publishing. </li><li> If no SEI data is sent within 1 minute after the remote user calls [sendSEIMessage](104478#sendseimessage), the black frame video stream stops publishing. </li></ul>
|
|
839
|
+
* <ul><li> When the remote user starts camera capture, switching from voice call to video call, the black frame video stream stops publishing. </li><li> When the remote user calls [setVideoSourceType](docs-104478#setvideosourcetype) to switch to custom video capture, black frame video stream stops publishing. </li><li> If no SEI data is sent within 1 minute after the remote user calls [sendSEIMessage](docs-104478#sendseimessage), the black frame video stream stops publishing. </li></ul>
|
|
838
840
|
*/
|
|
839
841
|
NORMAL = 1
|
|
840
842
|
}
|
|
@@ -990,7 +992,7 @@ export declare enum AudioMixingType {
|
|
|
990
992
|
|
|
991
993
|
/**
|
|
992
994
|
* @brief Audio quality
|
|
993
|
-
* Call [setAudioProfile](104478#setaudioprofile) to choose an audio quality option.
|
|
995
|
+
* Call [setAudioProfile](docs-104478#setaudioprofile) to choose an audio quality option.
|
|
994
996
|
*/
|
|
995
997
|
export declare enum AudioProfileType {
|
|
996
998
|
|
|
@@ -1043,7 +1045,7 @@ export declare enum AudioProfileType {
|
|
|
1043
1045
|
|
|
1044
1046
|
/**
|
|
1045
1047
|
* @brief The data range of the local main stream audio callback. It controls whether the callback includes mixed audio.
|
|
1046
|
-
* This feature affects the callback [onActiveSpeaker](104479#onactivespeaker). For example, if [AudioReportMode](#audioreportmode) is set to `AUDIOMIXING`, the callback may still include the local user's main stream audio even with zero microphone volume.
|
|
1048
|
+
* This feature affects the callback [onActiveSpeaker](docs-104479#onactivespeaker). For example, if [AudioReportMode](#audioreportmode) is set to `AUDIOMIXING`, the callback may still include the local user's main stream audio even with zero microphone volume.
|
|
1047
1049
|
*/
|
|
1048
1050
|
export declare enum AudioReportMode {
|
|
1049
1051
|
|
|
@@ -1209,7 +1211,7 @@ export declare enum ForwardStreamState {
|
|
|
1209
1211
|
|
|
1210
1212
|
/**
|
|
1211
1213
|
* @brief Audio callback mode of local main stream.
|
|
1212
|
-
* This feature affects the callback [onActiveSpeaker](104479#onactivespeaker). For example, if [LocalMainReportMode](#localmainreportmode) is set to `RESET` when the local main stream is unpublished, the callback will never include the local user's main stream audio.
|
|
1214
|
+
* This feature affects the callback [onActiveSpeaker](docs-104479#onactivespeaker). For example, if [LocalMainReportMode](#localmainreportmode) is set to `RESET` when the local main stream is unpublished, the callback will never include the local user's main stream audio.
|
|
1213
1215
|
*/
|
|
1214
1216
|
export declare enum LocalMainReportMode {
|
|
1215
1217
|
|
|
@@ -1408,6 +1410,16 @@ export declare enum RTCAutoPlayPolicy {
|
|
|
1408
1410
|
*/
|
|
1409
1411
|
PLAY_MANUALLY = 2
|
|
1410
1412
|
}
|
|
1413
|
+
/**
|
|
1414
|
+
* @hidden
|
|
1415
|
+
* 发生重连的原因
|
|
1416
|
+
*/
|
|
1417
|
+
export declare enum ReconnectReason {
|
|
1418
|
+
ICE_FAILED = "iceFailed",
|
|
1419
|
+
NODE_CHANGE = "nodeChange",
|
|
1420
|
+
JOIN_TIMEOUT = "joinTimeout",
|
|
1421
|
+
NOTIFY_RECONNECT = "notifyReconnect"
|
|
1422
|
+
}
|
|
1411
1423
|
|
|
1412
1424
|
/**
|
|
1413
1425
|
* @brief priority of the remote user
|
|
@@ -1432,8 +1444,8 @@ export declare enum RemoteUserPriority {
|
|
|
1432
1444
|
|
|
1433
1445
|
/**
|
|
1434
1446
|
* @brief Room profile
|
|
1435
|
-
* While calling [joinRoom](104478#joinroom) choose an appropriate room-profile option to meet the requirement of the scenario for media encoding algorithm, video profiles, and network configurations.
|
|
1436
|
-
* Call [setAudioProfile](104478#setaudioprofile) to choose an audio quality option if it is necessary.
|
|
1447
|
+
* While calling [joinRoom](docs-104478#joinroom) choose an appropriate room-profile option to meet the requirement of the scenario for media encoding algorithm, video profiles, and network configurations.
|
|
1448
|
+
* Call [setAudioProfile](docs-104478#setaudioprofile) to choose an audio quality option if it is necessary.
|
|
1437
1449
|
*/
|
|
1438
1450
|
export declare enum RoomProfileType {
|
|
1439
1451
|
|
|
@@ -1553,8 +1565,8 @@ export declare enum SubscribeFallbackOption {
|
|
|
1553
1565
|
DISABLE = 0,
|
|
1554
1566
|
|
|
1555
1567
|
/**
|
|
1556
|
-
* @brief When the downstream network quality is bad, the video stream fallbacks to stream of lower resolution and then to voice only. See [Media Stream Fallback](https://docs.byteplus.com/en/byteplus-rtc/docs
|
|
1557
|
-
* This setting takes effect only when the publisher enables simulcast mode through [EnableSimulcastMode](104478#enablesimulcastmode).
|
|
1568
|
+
* @brief When the downstream network quality is bad, the video stream fallbacks to stream of lower resolution and then to voice only. See [Media Stream Fallback](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-70137) for fallback rules.
|
|
1569
|
+
* This setting takes effect only when the publisher enables simulcast mode through [EnableSimulcastMode](docs-104478#enablesimulcastmode).
|
|
1558
1570
|
*/
|
|
1559
1571
|
VIDEO_STREAM_LOW = 1,
|
|
1560
1572
|
|
|
@@ -1576,7 +1588,7 @@ export declare enum SubscribeMode {
|
|
|
1576
1588
|
AUTO_SUBSCRIBE_MODE = 0,
|
|
1577
1589
|
|
|
1578
1590
|
/**
|
|
1579
|
-
* @brief Manual. You can subscribe the stream in the room manually by calling [subscribeUserStream](104478#subscribeuserstream).
|
|
1591
|
+
* @brief Manual. You can subscribe the stream in the room manually by calling [subscribeUserStream](docs-104478#subscribeuserstream).
|
|
1580
1592
|
*/
|
|
1581
1593
|
MANUAL_SUBSCRIBE_MODE = 1
|
|
1582
1594
|
}
|
|
@@ -1880,6 +1892,11 @@ export interface AutoPlayFailedEvent {
|
|
|
1880
1892
|
* @brief Remote stream type
|
|
1881
1893
|
*/
|
|
1882
1894
|
mediaType: MediaType.AUDIO | MediaType.VIDEO;
|
|
1895
|
+
|
|
1896
|
+
/**
|
|
1897
|
+
* @brief Player ID. An empty value indicates the default player.
|
|
1898
|
+
*/
|
|
1899
|
+
playerId?: string;
|
|
1883
1900
|
}
|
|
1884
1901
|
|
|
1885
1902
|
/**
|
|
@@ -1923,6 +1940,12 @@ export interface ConnectionStateChangeEvent {
|
|
|
1923
1940
|
* @brief The internal connection state
|
|
1924
1941
|
*/
|
|
1925
1942
|
state: ConnectionState;
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* @hidden
|
|
1946
|
+
* @brief The reason to the reconnection
|
|
1947
|
+
*/
|
|
1948
|
+
reason?: ReconnectReason;
|
|
1926
1949
|
}
|
|
1927
1950
|
export interface CoreConfigType {
|
|
1928
1951
|
UPLOAD_CONSOLE_ON: boolean;
|
|
@@ -2024,7 +2047,7 @@ export interface IAudioMixingManager {
|
|
|
2024
2047
|
* @param id Mix ID. For identifying the mix, please ensure that the mix ID is unique.
|
|
2025
2048
|
* If this method is repeatedly called with the same ID, the previous mix stops and the next mix starts.
|
|
2026
2049
|
* @param filePath Specify the file path either the absolute path of a local file or the url of online audio. Files with the extension of mp3 and aac are supported.
|
|
2027
|
-
* @param
|
|
2050
|
+
* @param options Mix Sound configuration.
|
|
2028
2051
|
* You can set the number of times the mix is played, whether the mix is played locally, and whether the mix is sent to the remote end. For details.
|
|
2029
2052
|
* @return `LOAD_RESOURCES_FAILED`: Loading resource failed. Please pass in the correct resource path.
|
|
2030
2053
|
* @notes + If you have already loaded the sound effect into memory through [preloadAudioMixing](#preloadaudiomixing), make sure that the ID here is the same as the ID set by [preloadAudioMixing](#preloadaudiomixing).
|
|
@@ -2089,7 +2112,7 @@ export interface IAudioMixingManager {
|
|
|
2089
2112
|
unloadAudioMixing: (id: number) => void;
|
|
2090
2113
|
|
|
2091
2114
|
/**
|
|
2092
|
-
* @brief Adjust the volume of audio mixing
|
|
2115
|
+
* @brief Adjust the volume of the audio-file mixing.
|
|
2093
2116
|
* @param id Mixing ID
|
|
2094
2117
|
* @param volume The ratio of the mixing volume to the original volume. The range is `[0, 400]`. The recommended range is `[0, 100]`.
|
|
2095
2118
|
* + 0: Mute
|
|
@@ -2228,7 +2251,7 @@ export interface IEngineEvents {
|
|
|
2228
2251
|
|
|
2229
2252
|
/**
|
|
2230
2253
|
* @brief Callback on new media streams captured by camera/microphone in the room.
|
|
2231
|
-
* @notes You will receive this callback after a remote user successfully publishes media streams captured by camera/microphone in the room with [publishStream](104478#publishstream). Then you can choose whether to call [subscribeStream](104478#subscribestream) to subscribe to the streams or not.
|
|
2254
|
+
* @notes You will receive this callback after a remote user successfully publishes media streams captured by camera/microphone in the room with [publishStream](docs-104478#publishstream). Then you can choose whether to call [subscribeStream](docs-104478#subscribestream) to subscribe to the streams or not.
|
|
2232
2255
|
* @group Audio & Video Transport
|
|
2233
2256
|
* @order 60
|
|
2234
2257
|
*/
|
|
@@ -2247,7 +2270,7 @@ export interface IEngineEvents {
|
|
|
2247
2270
|
|
|
2248
2271
|
/**
|
|
2249
2272
|
* @brief Callback on removal of remote media stream captured by camera/microphone.
|
|
2250
|
-
* @notes You will receive this callback after a remote user successfully unpublishes media streams captured by camera/microphone in the room with [unpublishStream](104478#unpublishstream). Then you can choose whether to call [unsubscribeStream](104478#unsubscribestream) to unsubscribe from the streams or not.
|
|
2273
|
+
* @notes You will receive this callback after a remote user successfully unpublishes media streams captured by camera/microphone in the room with [unpublishStream](docs-104478#unpublishstream). Then you can choose whether to call [unsubscribeStream](docs-104478#unsubscribestream) to unsubscribe from the streams or not.
|
|
2251
2274
|
* @group Audio & Video Transport
|
|
2252
2275
|
* @order 61
|
|
2253
2276
|
*/
|
|
@@ -2271,7 +2294,7 @@ export interface IEngineEvents {
|
|
|
2271
2294
|
|
|
2272
2295
|
/**
|
|
2273
2296
|
* @brief Callback on new screen sharing media streams from remote users in the room.
|
|
2274
|
-
* @notes You will receive this callback after a remote user successfully published screen sharing streams in the room with [publishScreen](104478#publishscreen). Then you can choose whether to call [subscribeScreen](104478#subscribescreen) to subscribe to the streams or not.
|
|
2297
|
+
* @notes You will receive this callback after a remote user successfully published screen sharing streams in the room with [publishScreen](docs-104478#publishscreen). Then you can choose whether to call [subscribeScreen](docs-104478#subscribescreen) to subscribe to the streams or not.
|
|
2275
2298
|
* @group Screen Sharing
|
|
2276
2299
|
* @order 30
|
|
2277
2300
|
*/
|
|
@@ -2290,7 +2313,7 @@ export interface IEngineEvents {
|
|
|
2290
2313
|
|
|
2291
2314
|
/**
|
|
2292
2315
|
* @brief Callback on removal of screen sharing media streams from remote users in the room.
|
|
2293
|
-
* @notes You will receive this callback after a remote user successfully unpublishes media streams captured by camera/microphone in the room with [unpublishScreen](104478#unpublishscreen). Then you can choose whether to call [unsubscribeScreen](104478#unsubscribescreen) to unsubscribe from the streams or not.
|
|
2316
|
+
* @notes You will receive this callback after a remote user successfully unpublishes media streams captured by camera/microphone in the room with [unpublishScreen](docs-104478#unpublishscreen). Then you can choose whether to call [unsubscribeScreen](docs-104478#unsubscribescreen) to unsubscribe from the streams or not.
|
|
2294
2317
|
* @group Screen Sharing
|
|
2295
2318
|
* @order 31
|
|
2296
2319
|
*/
|
|
@@ -2377,7 +2400,7 @@ export interface IEngineEvents {
|
|
|
2377
2400
|
[EngineEventsTypes.onTrackEnded]: (event: {
|
|
2378
2401
|
|
|
2379
2402
|
/**
|
|
2380
|
-
* @brief
|
|
2403
|
+
* @brief Media stream kind. Refer to [kind](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/kind).
|
|
2381
2404
|
*/
|
|
2382
2405
|
kind: string;
|
|
2383
2406
|
|
|
@@ -2458,7 +2481,7 @@ export interface IEngineEvents {
|
|
|
2458
2481
|
}) => void;
|
|
2459
2482
|
|
|
2460
2483
|
/**
|
|
2461
|
-
* @brief Receiving a point-to-point text message from one of the users in the room by calling [sendUserMessage](104478#sendusermessage)
|
|
2484
|
+
* @brief Receiving a point-to-point text message from one of the users in the room by calling [sendUserMessage](docs-104478#sendusermessage)
|
|
2462
2485
|
* @param event
|
|
2463
2486
|
* @group Message
|
|
2464
2487
|
* @order 50
|
|
@@ -2490,7 +2513,7 @@ export interface IEngineEvents {
|
|
|
2490
2513
|
[EngineEventsTypes.onLocalStreamStats]: (stats: LocalStreamStats) => void;
|
|
2491
2514
|
|
|
2492
2515
|
/**
|
|
2493
|
-
* @brief This 2 s periodical callback notifies information of the public stream after calling [startPlayPublicStream](104478#startplaypublicstream).
|
|
2516
|
+
* @brief This 2 s periodical callback notifies information of the public stream after calling [startPlayPublicStream](docs-104478#startplaypublicstream).
|
|
2494
2517
|
* @param stats
|
|
2495
2518
|
* @group Public Stream
|
|
2496
2519
|
* @order 20
|
|
@@ -2513,7 +2536,7 @@ export interface IEngineEvents {
|
|
|
2513
2536
|
}) => void;
|
|
2514
2537
|
|
|
2515
2538
|
/**
|
|
2516
|
-
* @brief After calling [enableAudioPropertiesReport](104478#enableaudiopropertiesreport), you will periodically receive this callback for the information about local audio.
|
|
2539
|
+
* @brief After calling [enableAudioPropertiesReport](docs-104478#enableaudiopropertiesreport), you will periodically receive this callback for the information about local audio.
|
|
2517
2540
|
* Local audio includes the microphone audio and the screen audio captured using RTC SDK internal mechanisms.
|
|
2518
2541
|
* @param event Information about local audio.
|
|
2519
2542
|
* @group Audio Management
|
|
@@ -2522,7 +2545,7 @@ export interface IEngineEvents {
|
|
|
2522
2545
|
[EngineEventsTypes.onLocalAudioPropertiesReport]: (event: LocalAudioPropertiesInfo[]) => void;
|
|
2523
2546
|
|
|
2524
2547
|
/**
|
|
2525
|
-
* @brief After calling [enableAudioPropertiesReport](104478#enableaudiopropertiesreport), you will periodically receive this callback for the information about the subscribed remote audio streams.
|
|
2548
|
+
* @brief After calling [enableAudioPropertiesReport](docs-104478#enableaudiopropertiesreport), you will periodically receive this callback for the information about the subscribed remote audio streams.
|
|
2526
2549
|
* The remote audio streams includes the microphone audio and screen audio collected using the RTC SDK internal mechanism/custom mechanism.
|
|
2527
2550
|
* @param event Information about remote audio.
|
|
2528
2551
|
* @group Audio Management
|
|
@@ -2531,7 +2554,7 @@ export interface IEngineEvents {
|
|
|
2531
2554
|
[EngineEventsTypes.onRemoteAudioPropertiesReport]: (event: RemoteAudioPropertiesInfo[]) => void;
|
|
2532
2555
|
|
|
2533
2556
|
/**
|
|
2534
|
-
* @brief After calling [enableAudioPropertiesReport](104478#enableaudiopropertiesreport), you will periodically receive this callback for the information of the user with the highest voice volume.
|
|
2557
|
+
* @brief After calling [enableAudioPropertiesReport](docs-104478#enableaudiopropertiesreport), you will periodically receive this callback for the information of the user with the highest voice volume.
|
|
2535
2558
|
* @param event The information of the user with the highest voice volume.
|
|
2536
2559
|
* @group Audio Management
|
|
2537
2560
|
* @order 60
|
|
@@ -2539,7 +2562,7 @@ export interface IEngineEvents {
|
|
|
2539
2562
|
[EngineEventsTypes.onActiveSpeaker]: (userInfo: UserInfo) => void;
|
|
2540
2563
|
|
|
2541
2564
|
/**
|
|
2542
|
-
* @brief The current playback device has been changed successfully by calling [setAudioPlaybackDevice](104478#setaudioplaybackdevice).
|
|
2565
|
+
* @brief The current playback device has been changed successfully by calling [setAudioPlaybackDevice](docs-104478#setaudioplaybackdevice).
|
|
2543
2566
|
* @param event Information of the media devices. See [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo).
|
|
2544
2567
|
* @group Audio Management
|
|
2545
2568
|
* @order 65
|
|
@@ -2547,7 +2570,7 @@ export interface IEngineEvents {
|
|
|
2547
2570
|
[EngineEventsTypes.onAudioPlaybackDeviceChanged]: (event: MediaDeviceInfo) => void;
|
|
2548
2571
|
|
|
2549
2572
|
/**
|
|
2550
|
-
* @brief The remote clients in the room will be informed of the state change via this event after the publisher starts audio capture by calling [startAudioCapture](104478#startaudiocapture).
|
|
2573
|
+
* @brief The remote clients in the room will be informed of the state change via this event after the publisher starts audio capture by calling [startAudioCapture](docs-104478#startaudiocapture).
|
|
2551
2574
|
* @param event
|
|
2552
2575
|
* @group Audio Management
|
|
2553
2576
|
* @order 70
|
|
@@ -2561,7 +2584,7 @@ export interface IEngineEvents {
|
|
|
2561
2584
|
}) => void;
|
|
2562
2585
|
|
|
2563
2586
|
/**
|
|
2564
|
-
* @brief The remote clients in the room will be informed of the state change via this event after the publisher stops audio capture by calling [stopAudioCapture](104478#stopaudiocapture).
|
|
2587
|
+
* @brief The remote clients in the room will be informed of the state change via this event after the publisher stops audio capture by calling [stopAudioCapture](docs-104478#stopaudiocapture).
|
|
2565
2588
|
* @param event
|
|
2566
2589
|
* @group Audio Management
|
|
2567
2590
|
* @order 71
|
|
@@ -2575,7 +2598,7 @@ export interface IEngineEvents {
|
|
|
2575
2598
|
}) => void;
|
|
2576
2599
|
|
|
2577
2600
|
/**
|
|
2578
|
-
* @brief The remote clients in the room will be informed of the state change via this event after the publisher starts video capture by calling [startVideoCapture](104478#startvideocapture).
|
|
2601
|
+
* @brief The remote clients in the room will be informed of the state change via this event after the publisher starts video capture by calling [startVideoCapture](docs-104478#startvideocapture).
|
|
2579
2602
|
* @param event
|
|
2580
2603
|
* @group Video Management
|
|
2581
2604
|
* @order 55
|
|
@@ -2589,7 +2612,7 @@ export interface IEngineEvents {
|
|
|
2589
2612
|
}) => void;
|
|
2590
2613
|
|
|
2591
2614
|
/**
|
|
2592
|
-
The remote clients in the room will be informed of the state change via this event after the publisher stops video capture by calling [stopVideoCapture](104478#stopvideocapture).
|
|
2615
|
+
The remote clients in the room will be informed of the state change via this event after the publisher stops video capture by calling [stopVideoCapture](docs-104478#stopvideocapture).
|
|
2593
2616
|
* @param event
|
|
2594
2617
|
* @group Video Management
|
|
2595
2618
|
* @order 56
|
|
@@ -2612,7 +2635,7 @@ export interface IEngineEvents {
|
|
|
2612
2635
|
|
|
2613
2636
|
/**
|
|
2614
2637
|
* @brief Stream update event of stream that contains SEI information.
|
|
2615
|
-
* In a voice call scenario, when a remote user calls [sendSEIMessage](104478#sendseimessage) to send SEI data via the black frame video stream, the stream's sending status will be notified to the local user through this event callback.
|
|
2638
|
+
* In a voice call scenario, when a remote user calls [sendSEIMessage](docs-104478#sendseimessage) to send SEI data via the black frame video stream, the stream's sending status will be notified to the local user through this event callback.
|
|
2616
2639
|
* If the video frame carrying SEI data is a black frame, you do not need to render the video frame.
|
|
2617
2640
|
* @param event Stream containing SEI information update event.
|
|
2618
2641
|
* @group Message
|
|
@@ -2689,7 +2712,7 @@ export interface IEngineEvents {
|
|
|
2689
2712
|
[EngineEventsTypes.onError]: (event: {
|
|
2690
2713
|
|
|
2691
2714
|
/**
|
|
2692
|
-
* @brief See [ErrorCode](104480#errorcode).
|
|
2715
|
+
* @brief See [ErrorCode](docs-104480#errorcode).
|
|
2693
2716
|
*/
|
|
2694
2717
|
errorCode: ErrorCode.DUPLICATE_LOGIN | ErrorCode.RTM_DUPLICATE_LOGIN | ErrorCode.RTM_TOKEN_ERROR | ErrorCode.TOKEN_EXPIRED | ErrorCode.RECONNECT_FAILED | ErrorCode.KICKED_OUT | ErrorCode.ROOM_DISMISS;
|
|
2695
2718
|
|
|
@@ -2726,7 +2749,7 @@ export interface IEngineEvents {
|
|
|
2726
2749
|
|
|
2727
2750
|
/**
|
|
2728
2751
|
* @brief You will receive this callback 30 seconds before the Token expires.
|
|
2729
|
-
* Call [updateToken](104478#updatetoken) to submit a new Token. The user will be removed from the room when the Token expires.
|
|
2752
|
+
* Call [updateToken](docs-104478#updatetoken) to submit a new Token. The user will be removed from the room when the Token expires.
|
|
2730
2753
|
* @group Room Management
|
|
2731
2754
|
* @order 45
|
|
2732
2755
|
*/
|
|
@@ -2734,15 +2757,15 @@ export interface IEngineEvents {
|
|
|
2734
2757
|
|
|
2735
2758
|
/**
|
|
2736
2759
|
* @brief This callback will be triggered 30 seconds before the token publishing permission expires.
|
|
2737
|
-
* Upon receiving this callback, call [updateToken](104478#updatetoken) to update the token.
|
|
2738
|
-
* @notes If the Token is not updated in time, the publishing permission will expire and the stream that is being published will stop. The publisher will receive the [onTokenPublishPrivilegeDidExpired](104479#ontokenpublishprivilegedidexpired) callback, and the remote user will receive the [onUserUnpublishStream](104479#onuserunpublishstream)/[onUserUnpublishScreen](104479#onuserunpublishscreen) callback, with the reason being `STREAM_REMOVE_REASON_TOKEN_PRIVILEGE_EXPIRED`.
|
|
2760
|
+
* Upon receiving this callback, call [updateToken](docs-104478#updatetoken) to update the token.
|
|
2761
|
+
* @notes If the Token is not updated in time, the publishing permission will expire and the stream that is being published will stop. The publisher will receive the [onTokenPublishPrivilegeDidExpired](docs-104479#ontokenpublishprivilegedidexpired) callback, and the remote user will receive the [onUserUnpublishStream](docs-104479#onuserunpublishstream)/[onUserUnpublishScreen](docs-104479#onuserunpublishscreen) callback, with the reason being `STREAM_REMOVE_REASON_TOKEN_PRIVILEGE_EXPIRED`.
|
|
2739
2762
|
* @group Room Management
|
|
2740
2763
|
* @order 50
|
|
2741
2764
|
*/
|
|
2742
2765
|
[EngineEventsTypes.onTokenPublishPrivilegeWillExpire]: () => void;
|
|
2743
2766
|
|
|
2744
2767
|
/**
|
|
2745
|
-
* @brief This callback is triggered when the token publishing permission expires. Call [updateToken](104478#updatetoken) to update the Token.
|
|
2768
|
+
* @brief This callback is triggered when the token publishing permission expires. Call [updateToken](docs-104478#updatetoken) to update the Token.
|
|
2746
2769
|
* @group Room Management
|
|
2747
2770
|
* @order 51
|
|
2748
2771
|
*/
|
|
@@ -2761,8 +2784,8 @@ export interface IEngineEvents {
|
|
|
2761
2784
|
|
|
2762
2785
|
/**
|
|
2763
2786
|
* @brief This callback will be triggered 30 seconds before the token subscription permission expires.
|
|
2764
|
-
* Upon receiving this callback, call [updateToken](104478#updatetoken) to update the token.
|
|
2765
|
-
* @notes If the Token is not updated in time after receiving this callback, the streams that have been subscribed to will be unsubscribed once the token subscription permission expires, and the subscriber will receive the [onTokenSubscribePrivilegeDidExpired](104479#ontokensubscribeprivilegedidexpired) callback.
|
|
2787
|
+
* Upon receiving this callback, call [updateToken](docs-104478#updatetoken) to update the token.
|
|
2788
|
+
* @notes If the Token is not updated in time after receiving this callback, the streams that have been subscribed to will be unsubscribed once the token subscription permission expires, and the subscriber will receive the [onTokenSubscribePrivilegeDidExpired](docs-104479#ontokensubscribeprivilegedidexpired) callback.
|
|
2766
2789
|
* Also, attempts to subscribe to new streams will fail, returning an error code `TOKEN_NO_SUBSCRIBE_PERMISSION`, indicating that the token subscription permission has expired.
|
|
2767
2790
|
* @group Room Management
|
|
2768
2791
|
* @order 55
|
|
@@ -2770,7 +2793,7 @@ export interface IEngineEvents {
|
|
|
2770
2793
|
[EngineEventsTypes.onTokenSubscribePrivilegeWillExpire]: () => void;
|
|
2771
2794
|
|
|
2772
2795
|
/**
|
|
2773
|
-
* @brief This callback is triggered when the token subscription permission expires. Call [updateToken](104478#updatetoken) to update the Token.
|
|
2796
|
+
* @brief This callback is triggered when the token subscription permission expires. Call [updateToken](docs-104478#updatetoken) to update the Token.
|
|
2774
2797
|
* @group Room Management
|
|
2775
2798
|
* @order 56
|
|
2776
2799
|
*/
|
|
@@ -2788,14 +2811,14 @@ export interface IEngineEvents {
|
|
|
2788
2811
|
}) => void;
|
|
2789
2812
|
|
|
2790
2813
|
/**
|
|
2791
|
-
* @brief Receives the callback when you call [startCloudProxy](104478#startcloudproxy) to start cloud proxy, and the SDK connects the proxy server successfully.
|
|
2814
|
+
* @brief Receives the callback when you call [startCloudProxy](docs-104478#startcloudproxy) to start cloud proxy, and the SDK connects the proxy server successfully.
|
|
2792
2815
|
* @param event
|
|
2793
2816
|
*/
|
|
2794
2817
|
[EngineEventsTypes.onCloudProxyConnected]: (event: CloudProxyConnectedEvent) => void;
|
|
2795
2818
|
|
|
2796
2819
|
/**
|
|
2797
2820
|
* @brief Callback of the result of publishing the public stream.
|
|
2798
|
-
* After calling [startPushPublicStream](104478#startpushpublicstream), you will be informed of the result through this callback.
|
|
2821
|
+
* After calling [startPushPublicStream](docs-104478#startpushpublicstream), you will be informed of the result through this callback.
|
|
2799
2822
|
* @param event
|
|
2800
2823
|
* @group Public Stream
|
|
2801
2824
|
* @order 25
|
|
@@ -2804,7 +2827,7 @@ export interface IEngineEvents {
|
|
|
2804
2827
|
|
|
2805
2828
|
/**
|
|
2806
2829
|
* @brief Callback of the SEI carried by the public video stream.
|
|
2807
|
-
* You will receive SEI by this callback if the public stream you subscribed to by calling [startPlayPublicStream](104478#startplaypublicstream) is carrying SEI.
|
|
2830
|
+
* You will receive SEI by this callback if the public stream you subscribed to by calling [startPlayPublicStream](docs-104478#startplaypublicstream) is carrying SEI.
|
|
2808
2831
|
* @param event
|
|
2809
2832
|
* @notes When multiple streams in the public stream contain SEI:
|
|
2810
2833
|
* + You will receive SEI from all the video frames if the SEI do not have conflicts.
|
|
@@ -2816,7 +2839,7 @@ export interface IEngineEvents {
|
|
|
2816
2839
|
|
|
2817
2840
|
/**
|
|
2818
2841
|
* @brief Callback of the successful decoding of the first video frame of the public stream.
|
|
2819
|
-
* Refer to [startPlayPublicStream](104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2842
|
+
* Refer to [startPlayPublicStream](docs-104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2820
2843
|
* @param event
|
|
2821
2844
|
* @group Public Stream
|
|
2822
2845
|
* @order 36
|
|
@@ -2825,7 +2848,7 @@ export interface IEngineEvents {
|
|
|
2825
2848
|
|
|
2826
2849
|
/**
|
|
2827
2850
|
* @brief Callback of the successful decoding of the first audio frame of the public stream.
|
|
2828
|
-
* Refer to [startPlayPublicStream](104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2851
|
+
* Refer to [startPlayPublicStream](docs-104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2829
2852
|
* @param event
|
|
2830
2853
|
* @group Public Stream
|
|
2831
2854
|
* @order 35
|
|
@@ -2834,7 +2857,7 @@ export interface IEngineEvents {
|
|
|
2834
2857
|
|
|
2835
2858
|
/**
|
|
2836
2859
|
* @brief Callback of the successful rendering of the first video frame of the public stream.
|
|
2837
|
-
* Refer to [startPlayPublicStream](104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2860
|
+
* Refer to [startPlayPublicStream](docs-104478#startplaypublicstream) for details about subscribing to a public stream.
|
|
2838
2861
|
* @param event
|
|
2839
2862
|
* @group Public Stream
|
|
2840
2863
|
* @order 37
|
|
@@ -2844,7 +2867,7 @@ export interface IEngineEvents {
|
|
|
2844
2867
|
/**
|
|
2845
2868
|
* @brief Notification on the playing volume during the test for the local audio devices
|
|
2846
2869
|
* @param volume playing volume during the test for the local audio devices in milliseconds. We recommend to set it to 200 ms.The range is [0,255].
|
|
2847
|
-
* @notes Start an audio-device test by calling [startAudioPlaybackDeviceTest](104478#startaudioplaybackdevicetest) or [startAudioDeviceRecordTest](104478#startaudiodevicerecordtest) will register this callback for regular notification on playing volume. You can set the time interval between each callback by passing a proper value when calling the API above.
|
|
2870
|
+
* @notes Start an audio-device test by calling [startAudioPlaybackDeviceTest](docs-104478#startaudioplaybackdevicetest) or [startAudioDeviceRecordTest](docs-104478#startaudiodevicerecordtest) will register this callback for regular notification on playing volume. You can set the time interval between each callback by passing a proper value when calling the API above.
|
|
2848
2871
|
* @group Device Management
|
|
2849
2872
|
* @order 40
|
|
2850
2873
|
*/
|
|
@@ -2961,7 +2984,7 @@ export interface IEngineEvents {
|
|
|
2961
2984
|
/**
|
|
2962
2985
|
* @hidden currently not available
|
|
2963
2986
|
* @brief Callback on subtitle states.
|
|
2964
|
-
* After you call [startSubtitle](104478#startsubtitle) and [stopSubtitle](104478#stopsubtitle), you will receive this callback which informs you of the states and error codes of the subtitling task, as well as detailed information on the third party services' errors.
|
|
2987
|
+
* After you call [startSubtitle](docs-104478#startsubtitle) and [stopSubtitle](docs-104478#stopsubtitle), you will receive this callback which informs you of the states and error codes of the subtitling task, as well as detailed information on the third party services' errors.
|
|
2965
2988
|
* @param e Subtitle status.
|
|
2966
2989
|
* @group Live Caption and Translation
|
|
2967
2990
|
* @order 10
|
|
@@ -2971,7 +2994,7 @@ export interface IEngineEvents {
|
|
|
2971
2994
|
/**
|
|
2972
2995
|
* @hidden currently not available
|
|
2973
2996
|
* @brief Callback on subtitle messages.
|
|
2974
|
-
* After calling [startSubtitle](104478#startsubtitle) successfully, you will receive this callback which informs you of the related information on subtitles.
|
|
2997
|
+
* After calling [startSubtitle](docs-104478#startsubtitle) successfully, you will receive this callback which informs you of the related information on subtitles.
|
|
2975
2998
|
* @param e Subtitle message. The subtitle messages will include multiple languages as the task specified. You can collect the `text` by `userId` and `language`.
|
|
2976
2999
|
* @group Live Caption and Translation
|
|
2977
3000
|
* @order 11
|
|
@@ -2981,8 +3004,8 @@ export interface IEngineEvents {
|
|
|
2981
3004
|
/**
|
|
2982
3005
|
* @brief Event of whether the setting for the message server successes
|
|
2983
3006
|
* @param error Error code
|
|
2984
|
-
* @notes + This event notifies you the result after the call of [setServerParams](104478#setserverparams).
|
|
2985
|
-
* + If you lose internet connection after calling [setServerParams](104478#setserverparams), you will receive this event once the internet reconnects.
|
|
3007
|
+
* @notes + This event notifies you the result after the call of [setServerParams](docs-104478#setserverparams).
|
|
3008
|
+
* + If you lose internet connection after calling [setServerParams](docs-104478#setserverparams), you will receive this event once the internet reconnects.
|
|
2986
3009
|
* @group Message
|
|
2987
3010
|
* @order 70
|
|
2988
3011
|
*/
|
|
@@ -3065,21 +3088,21 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3065
3088
|
* @brief Join the room.
|
|
3066
3089
|
* Call this method to join the room and make audio & video calls with other users in the room.
|
|
3067
3090
|
* @param token Dynamic key. It is used for authentication and verification of users entering the room.
|
|
3068
|
-
* You need to bring Token to enter the room. When testing, you can use the console to generate temporary tokens. The official launch requires the use of the key SDK to generate and issue tokens at your server level. See [Use Token to complete authentication](70121) for token validity and generation method.
|
|
3091
|
+
* You need to bring Token to enter the room. When testing, you can use the console to generate temporary tokens. The official launch requires the use of the key SDK to generate and issue tokens at your server level. See [Use Token to complete authentication](docs-70121) for token validity and generation method.
|
|
3069
3092
|
* Apps with different AppIDs are not interoperable.
|
|
3070
3093
|
* Make sure that the AppID used to generate the Token is the same as the AppID used to create the engine, otherwise it will cause the join room to fail.
|
|
3071
3094
|
* @param roomId The Room ID. The string must conform to the regular expression: `[a-zA-Z0-9_@\-\.]{1,128}`.
|
|
3072
3095
|
* @param userInfo User information.
|
|
3073
3096
|
* @param roomConfig Room parameter configuration, set the room mode and whether to automatically publish or subscribe to the flow.
|
|
3074
3097
|
* @return + `INVALID_TOKEN`: Failed to enter the room due to using an expired or invalid token.
|
|
3075
|
-
* + `JOIN_ROOM_FAILED`: Failed to enter the room.
|
|
3098
|
+
* + `JOIN_ROOM_FAILED`: Failed to enter the room.
|
|
3076
3099
|
* + `REPEAT_JOIN`: Join the same room repeatedly.
|
|
3077
3100
|
* + `ROOM_FORBIDDEN`: Failed to enter the room because the room has been banned.
|
|
3078
3101
|
* + `USER_FORBIDDEN`: Failed to enter the room because the user has been banned.
|
|
3079
3102
|
* @notes + In the same room with the same App ID, the user ID of each user must be unique. The user will be kicked out of the room when a user with the same userID joins the room because of the error of `DUPLICATE_LOGIN`.
|
|
3080
|
-
* + Remote users will receive [onUserJoined](104479#onuserjoined) callback when a visible user joins the room. Call [setUserVisibility](#setuservisibility) to switch the visibility of the user.
|
|
3081
|
-
* + By default, the user is visible in an RTC room. Joining fails when the number of users in an RTC room reaches the upper limit. To avoid this, call [setUserVisibility](#setuservisibility) to change the visibility of the audience users to false by considering the capacity for the invisible users is much larger than that for visible users. An RTC room can accommodate a maximum of 50 visible users, and 30 media streams can be published simultaneously. For more information, see [Room Capability](257549).
|
|
3082
|
-
* + RTC SDK will try reconnect after losing connection to the server caused by a poor network connection. At this point, [onConnectionStateChanged](104479#onconnectionstatechanged) callback will be triggered and the SDK will automatically retry until it successfully reconnects to the server. The remote user will receive [onUserJoined](104479#onuserjoined) if a visible user reconnected successfully.
|
|
3103
|
+
* + Remote users will receive [onUserJoined](docs-104479#onuserjoined) callback when a visible user joins the room. Call [setUserVisibility](#setuservisibility) to switch the visibility of the user.
|
|
3104
|
+
* + By default, the user is visible in an RTC room. Joining fails when the number of users in an RTC room reaches the upper limit. To avoid this, call [setUserVisibility](#setuservisibility) to change the visibility of the audience users to false by considering the capacity for the invisible users is much larger than that for visible users. An RTC room can accommodate a maximum of 50 visible users, and 30 media streams can be published simultaneously. For more information, see [Room Capability](docs-257549).
|
|
3105
|
+
* + RTC SDK will try reconnect after losing connection to the server caused by a poor network connection. At this point, [onConnectionStateChanged](docs-104479#onconnectionstatechanged) callback will be triggered and the SDK will automatically retry until it successfully reconnects to the server. The remote user will receive [onUserJoined](docs-104479#onuserjoined) if a visible user reconnected successfully.
|
|
3083
3106
|
* @group Room Management
|
|
3084
3107
|
* @order 0
|
|
3085
3108
|
*/
|
|
@@ -3088,7 +3111,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3088
3111
|
/**
|
|
3089
3112
|
* @brief Leave the room.
|
|
3090
3113
|
* The user calls this API to leave the room, end the call process, and release all call-related resources.
|
|
3091
|
-
* @
|
|
3114
|
+
* @param waitAck Reserved parameter, no actual significance.
|
|
3115
|
+
* @notes + After visible users leave the room, other users in the room will receive [onUserLeave](docs-104479#onuserleave) callback notification.
|
|
3092
3116
|
* + You must call this API to end the call, after calling the [joinRoom](#joinroom) method to join the room. Otherwise you cannot start the next call. Repeatedly call this method have no negative impact.
|
|
3093
3117
|
* @group Room Management
|
|
3094
3118
|
* @order 1
|
|
@@ -3098,7 +3122,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3098
3122
|
/**
|
|
3099
3123
|
* @hidden
|
|
3100
3124
|
* @brief Destroy engine
|
|
3101
|
-
* Destroy the engine instances created by calling [createEngine](104478#createengine) and release all related resources.
|
|
3125
|
+
* Destroy the engine instances created by calling [createEngine](docs-104478#createengine) and release all related resources.
|
|
3102
3126
|
* @notes + Make sure that the business scenarios related to the `RTCEngine` instances that need to be destroyed are all finished before calling this API.
|
|
3103
3127
|
* + Calling this API will destroy all memory related to this `RTCEngine` instance, and stop any interaction with the media server.
|
|
3104
3128
|
* + This API is a blocking call which will block the current thread until the SDK completes the exit logic. Therefore, do NOT to call this API directly in the callback thread. Besides do NOT wait for the execution of the main thread including this API in any callback, thus causing a deadlock.
|
|
@@ -3110,7 +3134,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3110
3134
|
* @param mediaType Media stream type, used for specifying whether to publish audio stream or video stream.
|
|
3111
3135
|
* @notes + An invisible user cannot publish media streams. Call [setUserVisibility](#setuservisibility) to change your visibility in the room.
|
|
3112
3136
|
* + Call [publishScreen](#publishscreen) to start screen sharing.
|
|
3113
|
-
* + After you call this API, the other users in the room will receive [onUserPublishStream](104479#onuserpublishstream).
|
|
3137
|
+
* + After you call this API, the other users in the room will receive [onUserPublishStream](docs-104479#onuserpublishstream).
|
|
3114
3138
|
* + Call [unpublishStream](#unpublishstream) to stop publishing streams.
|
|
3115
3139
|
* @return + `NO_PUBLISH_PERMISSION`: No permission to publish streams. Please call [setUserVisibility](#setuservisibility) to switch the user to be visible first.
|
|
3116
3140
|
* + `TOKEN_NO_PUBLISH_PERMISSION`: The Token has no publishing permission or the publishing permission has expired, call [updateToke](#updatetoken) to update the Token's publishing permission.
|
|
@@ -3124,7 +3148,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3124
3148
|
* @brief Stops publishing media streams captured by camera/microphone in the current room.
|
|
3125
3149
|
* @param mediaType Media stream type, used for specifying whether to stop publishing audio stream or video stream.
|
|
3126
3150
|
* @notes + After calling [publishStream](#publishstream), call this API to stop publishing streams.
|
|
3127
|
-
* + After calling this API, the other users in the room will receive [onUserUnpublishStream](104479#onuserunpublishstream).
|
|
3151
|
+
* + After calling this API, the other users in the room will receive [onUserUnpublishStream](docs-104479#onuserunpublishstream).
|
|
3128
3152
|
* @group Audio & Video Transport
|
|
3129
3153
|
* @order 1
|
|
3130
3154
|
*/
|
|
@@ -3134,7 +3158,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3134
3158
|
* @brief Publishes local screen sharing streams in the current room.
|
|
3135
3159
|
* @param mediaType Media stream type, used for specifying whether to publish audio stream or video stream.
|
|
3136
3160
|
* @notes + An invisible user cannot publish media streams. Call [setUserVisibility](#setuservisibility) to change your visibility in the room.
|
|
3137
|
-
* + After you called this API, the other users in the room will receive [onUserPublishScreen](104479#onuserpublishscreen).
|
|
3161
|
+
* + After you called this API, the other users in the room will receive [onUserPublishScreen](docs-104479#onuserpublishscreen).
|
|
3138
3162
|
* + Call [unpublishScreen](#unpublishscreen) to stop publishing screen sharing streams.
|
|
3139
3163
|
* @return + `NO_PUBLISH_PERMISSION`: No permission to publish streams. Please call [setUserVisibility](#setuservisibility) to switch the user to be visible first.
|
|
3140
3164
|
* + `TOKEN_NO_PUBLISH_PERMISSION`: The Token has no publishing permission or the publishing permission has expired, call [updateToke](#updatetoken) to update the Token's publishing permission.
|
|
@@ -3148,7 +3172,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3148
3172
|
* @brief Stops publishing local screen sharing streams in the current room.
|
|
3149
3173
|
* @param mediaType Media stream type, used for specifying whether to stop publishing audio stream or video stream.
|
|
3150
3174
|
* @notes + After calling [publishScreen](#publishscreen), call this API to stop publishing streams.
|
|
3151
|
-
* + After calling this API, the other users in the room will receive [onUserUnpublishScreen](104479#onuserunpublishscreen).
|
|
3175
|
+
* + After calling this API, the other users in the room will receive [onUserUnpublishScreen](docs-104479#onuserunpublishscreen).
|
|
3152
3176
|
* @group Screen Sharing
|
|
3153
3177
|
* @order 11
|
|
3154
3178
|
*/
|
|
@@ -3159,7 +3183,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3159
3183
|
* You can call this API in both automatic subscription mode and manual subscription mode.
|
|
3160
3184
|
* @param userId The ID of the remote user who published the target audio/video stream.
|
|
3161
3185
|
* @param mediaType Media stream type, used for specifying whether to subscribe to the audio stream or the video stream.
|
|
3162
|
-
* @notes You must first get the remote stream information through [onUserPublishStream](104479#onuserpublishstream) before calling this API to subscribe to streams accordingly.
|
|
3186
|
+
* @notes You must first get the remote stream information through [onUserPublishStream](docs-104479#onuserpublishstream) before calling this API to subscribe to streams accordingly.
|
|
3163
3187
|
* @return + `STREAM_NOT_EXIST`: The target stream does not exist. Please enter the correct ID or make sure that the target stream is in the room.
|
|
3164
3188
|
* + `TOKEN_NO_SUBSCRIBE_PERMISSION`: The Token has no subscription permission or the subscription permission has expired, call [updateToke](#updatetoken) to update the Token's subscription permission.
|
|
3165
3189
|
* @group Audio & Video Transport
|
|
@@ -3183,7 +3207,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3183
3207
|
* You can call this API in both automatic subscription mode and manual subscription mode.
|
|
3184
3208
|
* @param userId The ID of the remote user who published the target screen audio/video stream.
|
|
3185
3209
|
* @param mediaType Media stream type, used for specifying whether to subscribe to the audio stream or the video stream.
|
|
3186
|
-
* @notes You must first get the remote stream information through [onUserPublishScreen](104479#onuserpublishscreen) before calling this API to subscribe to streams accordingly.
|
|
3210
|
+
* @notes You must first get the remote stream information through [onUserPublishScreen](docs-104479#onuserpublishscreen) before calling this API to subscribe to streams accordingly.
|
|
3187
3211
|
* @return + `STREAM_NOT_EXIST`: The target stream does not exist. Please enter the correct ID or make sure that the target stream is in the room.
|
|
3188
3212
|
* + `TOKEN_NO_SUBSCRIBE_PERMISSION`: The Token has no subscription permission or the subscription permission has expired, call [updateToke](#updatetoken) to update the Token's subscription permission.
|
|
3189
3213
|
* @group Screen Sharing
|
|
@@ -3194,8 +3218,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3194
3218
|
/**
|
|
3195
3219
|
* @brief Unsubscribes from specific screen sharing media stream.
|
|
3196
3220
|
* You can call this API in both automatic subscription mode and manual subscription mode.
|
|
3197
|
-
* @param
|
|
3198
|
-
* @param
|
|
3221
|
+
* @param userId The ID of the remote user who published the target screen audio/video stream.
|
|
3222
|
+
* @param mediaType Media stream type, used for specifying whether to unsubscribe from the audio stream or the video stream.
|
|
3199
3223
|
* @group Screen Sharing
|
|
3200
3224
|
* @order 16
|
|
3201
3225
|
*/
|
|
@@ -3203,7 +3227,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3203
3227
|
|
|
3204
3228
|
/**
|
|
3205
3229
|
* @brief Update Token.
|
|
3206
|
-
* You will receive [onTokenWillExpire](104479#ontokenwillexpire) 30 s before the Token expires. Call this API to submit a new Token.
|
|
3230
|
+
* You will receive [onTokenWillExpire](docs-104479#ontokenwillexpire) 30 s before the Token expires. Call this API to submit a new Token.
|
|
3207
3231
|
* @param token A valid token.
|
|
3208
3232
|
* @notes + If you call [joinRoom](#joinroom) with an expired token, the joining will fail with an error code `INVALID_TOKEN`. And you need to obtain a valid token and call this API to update the token.
|
|
3209
3233
|
* + If joining a room failed because the token expired, call this API with an updated token. And then RTC SDK will automatically rejoin the room without calling [joinRoom](#joinroom) again.
|
|
@@ -3240,7 +3264,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3240
3264
|
/**
|
|
3241
3265
|
* @brief Enable internal video capture. The default state is off.
|
|
3242
3266
|
* Internal video capture refers to: capturing video using the built-in module.
|
|
3243
|
-
* The remote clients in the room will be informed of the state change via [onUserStartVideoCapture](104479#onuserstartvideocapture) after the publisher starts video capture by calling this API.
|
|
3267
|
+
* The remote clients in the room will be informed of the state change via [onUserStartVideoCapture](docs-104479#onuserstartvideocapture) after the publisher starts video capture by calling this API.
|
|
3244
3268
|
* @param deviceId ID of the capture device which you need to pass in to avoid exceptions such as no screen or a screen that is not the desired one. You can call [enumerateDevices](#enumeratedevices) to obtain the list of devices.
|
|
3245
3269
|
* @return The actual effective video capture parameters. See [MediaTrackSettings](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings). Pay attention to the properties: `frameRate`, `height`, and `width`.
|
|
3246
3270
|
* The following error codes may be returned.
|
|
@@ -3258,7 +3282,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3258
3282
|
/**
|
|
3259
3283
|
* @brief Enable internal video capture immediately. The default setting is off.
|
|
3260
3284
|
* Internal video capture refers to: capturing video using the built-in module.
|
|
3261
|
-
* The remote clients in the room will be informed of the state change via [onUserStopVideoCapture](104479#onuserstopvideocapture) after the publisher stops video capture by calling this API.
|
|
3285
|
+
* The remote clients in the room will be informed of the state change via [onUserStopVideoCapture](docs-104479#onuserstopvideocapture) after the publisher stops video capture by calling this API.
|
|
3262
3286
|
* @return `STREAM_TYPE_NOT_MATCH`: Wrong stream type. Triggered when you call internal capture APIs after switch to the custom stream source with setVideoSourceType.
|
|
3263
3287
|
* @notes + Call [startVideoCapture](#startvideocapture) to enable the internal video capture.
|
|
3264
3288
|
* + Without calling this API the internal video capture will sustain until you destroy the engine instance.
|
|
@@ -3270,7 +3294,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3270
3294
|
/**
|
|
3271
3295
|
* @brief Start internal audio capture. The default is off.
|
|
3272
3296
|
* Internal audio capture refers to: capturing audio using the built-in module.
|
|
3273
|
-
* The remote clients in the room will be informed of the state change via [onUserStartAudioCapture](104479#onuserstartaudiocapture) after the publisher starts audio capture by calling this API.
|
|
3297
|
+
* The remote clients in the room will be informed of the state change via [onUserStartAudioCapture](docs-104479#onuserstartaudiocapture) after the publisher starts audio capture by calling this API.
|
|
3274
3298
|
* @param deviceId ID of the capture device which you need to pass in to avoid exceptions such as no sound. You can call [enumerateDevices](#enumeratedevices) to obtain the list of devices.
|
|
3275
3299
|
* @return The actual effective audio capture parameters. See [MediaTrackSettings](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings).
|
|
3276
3300
|
* The following error codes may be returned.
|
|
@@ -3287,7 +3311,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3287
3311
|
/**
|
|
3288
3312
|
* @brief Stop internal audio capture. The default is off.
|
|
3289
3313
|
* Internal audio capture refers to: capturing audio using the built-in module.
|
|
3290
|
-
* The remote clients in the room will be informed of the state change via [onUserStopAudioCapture](104479#onuserstopaudiocapture) after stopping audio capture by calling this API.
|
|
3314
|
+
* The remote clients in the room will be informed of the state change via [onUserStopAudioCapture](docs-104479#onuserstopaudiocapture) after stopping audio capture by calling this API.
|
|
3291
3315
|
* @return `STREAM_TYPE_NOT_MATCH`: Wrong stream type. Triggered when you call internal capture APIs after switch to the custom stream source with setAudioSourceType.
|
|
3292
3316
|
* @notes + Call [startAudioCapture](#startaudiocapture) to enable the internal audio capture.
|
|
3293
3317
|
* + Without calling this API the internal audio capture will sustain until you destroy the engine instance.
|
|
@@ -3298,7 +3322,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3298
3322
|
|
|
3299
3323
|
/**
|
|
3300
3324
|
* @brief Enable audio and video capture using the internal capture module. When calling this method, the browser will request microphone and camera permissions simultaneously, and the user only needs to grant permission once.
|
|
3301
|
-
* When calling this method, other users in the room will receive the callback of [onUserStartVideoCapture](104479#onuserstartvideocapture) and [onUserStartAudioCapture](104479#onuserstartaudiocapture).
|
|
3325
|
+
* When calling this method, other users in the room will receive the callback of [onUserStartVideoCapture](docs-104479#onuserstartvideocapture) and [onUserStartAudioCapture](docs-104479#onuserstartaudiocapture).
|
|
3302
3326
|
* @param optionsOrAudioDeviceId When using a single parameter, both audio and video device IDs can be set simultaneously. When using two parameters, the audio device's ID can be set.
|
|
3303
3327
|
* @param videoDeviceId Video device's ID.
|
|
3304
3328
|
* @return The actual audio and video capture parameters that take effect. Refer to [MediaTrackSettings](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings). Pay attention to the properties: `deviceId`, `channelCount`, `sampleRate`, `frameRate`, `height` and `width`.
|
|
@@ -3333,7 +3357,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3333
3357
|
/**
|
|
3334
3358
|
* @hidden
|
|
3335
3359
|
* @brief Enable audio and video capture using the internal capture module. When calling this method, the browser will request microphone and camera permissions simultaneously, and the user only needs to grant permission once.
|
|
3336
|
-
* When calling this method, other users in the room will receive the callback of [onUserStartVideoCapture](104479#onuserstartvideocapture) and [onUserStartAudioCapture](104479#onuserstartaudiocapture).
|
|
3360
|
+
* When calling this method, other users in the room will receive the callback of [onUserStartVideoCapture](docs-104479#onuserstartvideocapture) and [onUserStartAudioCapture](docs-104479#onuserstartaudiocapture).
|
|
3337
3361
|
* @param videoDeviceId Video device's ID.
|
|
3338
3362
|
* @param audioDeviceId Audio device's ID.
|
|
3339
3363
|
* @return The actual audio and video capture parameters that take effect. Refer to [MediaTrackSettings](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings). Pay attention to the properties: `deviceId`, `channelCount`, `sampleRate`, `frameRate`, `height` and `width`.
|
|
@@ -3368,23 +3392,25 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3368
3392
|
stopScreenCapture: () => Promise<void>;
|
|
3369
3393
|
|
|
3370
3394
|
/**
|
|
3371
|
-
* @brief
|
|
3395
|
+
* @brief Add the local media stream to a player and set the rendering mode for the rendering of the local stream.
|
|
3372
3396
|
* Listen to `onPlayerEvent` for the state after binding a view to the local video stream.
|
|
3373
|
-
* Call this API again with a blank view to
|
|
3397
|
+
* Call this API again with a blank view to remove the stream from the player. Doing this without a playerId while there are multiple players including a default player will remove the stream from the default player.
|
|
3374
3398
|
* @param streamIndex Video stream properties
|
|
3375
|
-
* @param videoPlayerOption View information and rendering mode
|
|
3376
|
-
* @notes You should bind the view after the user joins a room. This setting will sustain when the user leaves the room.
|
|
3399
|
+
* @param videoPlayerOption View information and rendering mode. Call this API repeatedly with different playerId to add the stream to different players.
|
|
3400
|
+
* @notes + You should bind the view after the user joins a room. This setting will sustain when the user leaves the room.
|
|
3401
|
+
* + If the stream has already been added to the specific player, repeated calls will not create duplicate players.
|
|
3377
3402
|
* @group Video Management
|
|
3378
3403
|
* @order 20
|
|
3379
3404
|
*/
|
|
3380
3405
|
setLocalVideoPlayer: (streamIndex: StreamIndex, videoPlayerOption?: Partial<Omit<VideoPlayerOption, "rotation">>) => HTMLVideoElement | undefined;
|
|
3381
3406
|
|
|
3382
3407
|
/**
|
|
3383
|
-
* @brief
|
|
3384
|
-
* It is recommended to call this API and bind a view once the event of [onUserPublishStream](104479#onuserpublishstream)/[onUserPublishScreen](104479#onuserpublishscreen) is triggered.
|
|
3385
|
-
* Call this API again with a blank view to
|
|
3386
|
-
* @param streamIndex Video stream properties
|
|
3387
|
-
* @param videoPlayerOption View information and rendering mode.
|
|
3408
|
+
* @brief Add the remote media stream to a player and set the rendering mode for the rendering of the remote stream.
|
|
3409
|
+
* It is recommended to call this API and bind a view once the event of [onUserPublishStream](docs-104479#onuserpublishstream)/[onUserPublishScreen](docs-104479#onuserpublishscreen) is triggered.
|
|
3410
|
+
* Call this API again with a blank view to remove the stream from the player. Doing this without a playerId while there are multiple players including a default player will remove the stream from the default player.
|
|
3411
|
+
* @param streamIndex Video stream properties.
|
|
3412
|
+
* @param videoPlayerOption View information and rendering mode. Since V4.61, call this API repeatedly with different playerIds to add the stream to different players.
|
|
3413
|
+
* Since V4.56, you can set the rotation of the stream via the `rotation` property.
|
|
3388
3414
|
* @notes You should bind the view after the user joins a room. This setting will sustain when the user leaves the room.
|
|
3389
3415
|
* @group Video Management
|
|
3390
3416
|
* @order 21
|
|
@@ -3404,7 +3430,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3404
3430
|
* @param deviceId ID of the audio playback device. Call [enumerateDevices](#enumeratedevices) to get device ID.
|
|
3405
3431
|
* @return + `INVALID_DEVICE_ID`: Invalid device ID.
|
|
3406
3432
|
* + `NOT_SUPPORTED`: The browser does not support audio device test or audio capture.
|
|
3407
|
-
* @notes
|
|
3433
|
+
* @notes + This method is available on Chrome.
|
|
3434
|
+
* + You can call this API before or after the user joins a room.
|
|
3408
3435
|
* @group Audio Management
|
|
3409
3436
|
* @order 1
|
|
3410
3437
|
*/
|
|
@@ -3412,18 +3439,59 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3412
3439
|
|
|
3413
3440
|
/**
|
|
3414
3441
|
* @brief Play audio and video stream manually.
|
|
3415
|
-
* Call this API when user need to take part in the audio and video reaction after calling [createEngine](104478#createengine) and set to autoPlay to False.
|
|
3416
|
-
* @param userId ID
|
|
3417
|
-
*
|
|
3418
|
-
* @param
|
|
3419
|
-
* @param
|
|
3442
|
+
* Call this API when user need to take part in the audio and video reaction after calling [createEngine](docs-104478#createengine) and set to autoPlay to False.
|
|
3443
|
+
* @param userId The user ID or the public stream ID. The empty value indicates the local stream. When you specify a public stream ID, the `mediaType` or `streamIndex` will not take effect.
|
|
3444
|
+
* @param mediaType For audio or video. It defaults to `AUDIO_AND_VIDEO`. The local audio is not included. While the Audio selection is enabled, it can only be set to `VIDEO`.
|
|
3445
|
+
* @param streamIndex Main stream or screen-sharing stream. By default, the action will apply to both the main stream and the screen-sharing stream.
|
|
3446
|
+
* @param playerId Player ID. An empty value indicates the default player.
|
|
3420
3447
|
* @return Calling this API when the audio and video are playing will also return a Promise.
|
|
3421
|
-
* @note + Call this
|
|
3422
|
-
* + Call this API
|
|
3448
|
+
* @note + Call this methods to play the stream in the player where the stream has been added into via [`setLocalVideoPlayer`](docs-104478#rtcengine-setlocalvideoplayer) or [`setRemoteVideoPlayer`](docs-104478#rtcengine-setremotevideoplayer).
|
|
3449
|
+
* + Call this API to start playback when the audio and/or video is not playing.
|
|
3450
|
+
* + Refer to [How to Deal with Auto-play Restrictions of Browsers](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-130302) for more information.
|
|
3423
3451
|
* @group Video Management
|
|
3424
3452
|
* @order 25
|
|
3425
3453
|
*/
|
|
3426
|
-
play: (userId?: string, mediaType?: MediaType, streamIndex?: StreamIndex) => Promise<void>;
|
|
3454
|
+
play: (userId?: string, mediaType?: MediaType, streamIndex?: StreamIndex, playerId?: string) => Promise<void>;
|
|
3455
|
+
/**
|
|
3456
|
+
* @brief Pause the specified media stream.
|
|
3457
|
+
* @param userId The user ID or the public stream ID. The empty value indicates the local stream. When you specify a public stream ID, the `mediaType` or `streamIndex` will not take effect.
|
|
3458
|
+
* @param mediaType For audio or video. It defaults to `AUDIO_AND_VIDEO`. The local audio is not included. While the Audio selection is enabled, it can only be set to `VIDEO`.
|
|
3459
|
+
* @param streamIndex Main stream or screen-sharing stream. By default, the action will apply to both the main stream and the screen-sharing stream.
|
|
3460
|
+
* @param playerId Player ID. An empty value indicates the default player.
|
|
3461
|
+
* @notes After using this method to pause the media stream,
|
|
3462
|
+
* + The billing duration will not stop counting since the subscription doesn't cancel.
|
|
3463
|
+
* + The stream will not remove from the player. You can call [play](#play) to resume the stream.
|
|
3464
|
+
* + The volume of the stream will not be `0`, which you can obtain via [getAudioLevel](getAudioLevel) or the callback of [onLocalAudioPropertiesReport](docs-104479#onlocalaudiopropertiesreport) or [onRemoteAudioPropertiesReport](docs-104479#onremoteaudiopropertiesreport).
|
|
3465
|
+
* @group Video Management
|
|
3466
|
+
* @order 26
|
|
3467
|
+
*/
|
|
3468
|
+
|
|
3469
|
+
stop: (userId?: string, mediaType?: MediaType, streamIndex?: StreamIndex, playerId?: string) => void;
|
|
3470
|
+
|
|
3471
|
+
/**
|
|
3472
|
+
* @brief Gets the volume of the remote audio stream or the local audio stream captured by the local microphone and screen audio stream.
|
|
3473
|
+
* @param streamIndex Main stream or screen-sharing stream
|
|
3474
|
+
* @param userId The user ID. The empty value indicates the local stream.
|
|
3475
|
+
* @return If the specified stream does not exist, the volume values are `0`.
|
|
3476
|
+
* + linear volume. The value is in linear relation to the original volume. The higher the value, the higher the volume. The range is [0,255]. <br>
|
|
3477
|
+
*   - [0, 25]: Silence
|
|
3478
|
+
*   - [26, 75]: Low volume
|
|
3479
|
+
*   - [76, 204]: Medium volume
|
|
3480
|
+
*   - [205, 255]: High volume
|
|
3481
|
+
* + non-linear volume in dB. The value is in proportion to the log value of the original volume. You can use the value to recognize the Active Speaker in the room. The range is [-127, 0].
|
|
3482
|
+
*   - [-127, -60]: Silence
|
|
3483
|
+
*   - [-59, -40]: Low volume
|
|
3484
|
+
*   - [-39, -20]: Medium volume
|
|
3485
|
+
*   - [-19, 0]: High volume
|
|
3486
|
+
* @notes + The interval for repeatedly calling this method should be at least 100 milliseconds.
|
|
3487
|
+
* + You can also get volume infor via [onLocalAudioPropertiesReport](docs-104479#onlocalaudiopropertiesreport) and [onRemoteAudioPropertiesReport](docs-104479#onremoteaudiopropertiesreport).
|
|
3488
|
+
* @group Audio Management
|
|
3489
|
+
* @order 27
|
|
3490
|
+
*/
|
|
3491
|
+
getAudioVolume: (streamIndex: StreamIndex, userId?: string) => {
|
|
3492
|
+
linearVolume: number;
|
|
3493
|
+
nonlinearVolume: number;
|
|
3494
|
+
};
|
|
3427
3495
|
|
|
3428
3496
|
/**
|
|
3429
3497
|
* @brief Pause receiving remote media streams.
|
|
@@ -3439,7 +3507,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3439
3507
|
|
|
3440
3508
|
/**
|
|
3441
3509
|
* @brief Resume receiving remote media streams
|
|
3442
|
-
* @param mediaType Media stream type
|
|
3510
|
+
* @param mediaType Media stream type
|
|
3443
3511
|
* @return
|
|
3444
3512
|
* @notes + Calling this API does not change the capture state and the transmission state of the remote clients.
|
|
3445
3513
|
* + Calling this API does not change any subscription configuration.
|
|
@@ -3450,7 +3518,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3450
3518
|
|
|
3451
3519
|
/**
|
|
3452
3520
|
* @brief Send point-to-point text messages to a specified user in the room.
|
|
3453
|
-
* The recipient receives the message via [onUserMessageReceived](104479#onusermessagereceived) once the message is sent successfully.
|
|
3521
|
+
* The recipient receives the message via [onUserMessageReceived](docs-104479#onusermessagereceived) once the message is sent successfully.
|
|
3454
3522
|
* @param userId User ID of the recipient
|
|
3455
3523
|
* @param message Text to be sent within 64 KB
|
|
3456
3524
|
* @return + `USER_MESSAGE_TIMEOUT`: P2P message failed to be sent due to a timeout.
|
|
@@ -3466,7 +3534,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3466
3534
|
|
|
3467
3535
|
/**
|
|
3468
3536
|
* @brief Send point-to-point binary messages to a specified user in the room.
|
|
3469
|
-
* The recipient receives the message via [onUserBinaryMessageReceived](104479#onuserbinarymessagereceived) once the message is sent successfully.
|
|
3537
|
+
* The recipient receives the message via [onUserBinaryMessageReceived](docs-104479#onuserbinarymessagereceived) once the message is sent successfully.
|
|
3470
3538
|
* @param userId User ID of the recipient
|
|
3471
3539
|
* @param message Binary to be sent within 64 KB
|
|
3472
3540
|
* @return + `USER_MESSAGE_TIMEOUT`: P2P message failed to be sent due to a timeout.
|
|
@@ -3482,7 +3550,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3482
3550
|
|
|
3483
3551
|
/**
|
|
3484
3552
|
* @brief Send text messaging to all other users in the room.
|
|
3485
|
-
* Users in the room will receive message via [onRoomMessageReceived](104479#onroommessagereceived) once the message is sent successfully.
|
|
3553
|
+
* Users in the room will receive message via [onRoomMessageReceived](docs-104479#onroommessagereceived) once the message is sent successfully.
|
|
3486
3554
|
* @param message Text to be sent within 64 KB
|
|
3487
3555
|
* @return
|
|
3488
3556
|
* @group Message
|
|
@@ -3492,7 +3560,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3492
3560
|
|
|
3493
3561
|
/**
|
|
3494
3562
|
* @brief Send binary messaging to all other users in the room.
|
|
3495
|
-
* Users in the room will receive binary message via [onRoomBinaryMessageReceived](104479#onroombinarymessagereceived) once the message is sent successfully.
|
|
3563
|
+
* Users in the room will receive binary message via [onRoomBinaryMessageReceived](docs-104479#onroombinarymessagereceived) once the message is sent successfully.
|
|
3496
3564
|
* @param message Binary message to be sent within 64 KB
|
|
3497
3565
|
* @return
|
|
3498
3566
|
* @group Message
|
|
@@ -3510,12 +3578,10 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3510
3578
|
*   - SEI messages only support H.264 encoding, and use on browsers with Chromium 86+.
|
|
3511
3579
|
*   - Android devices do not support sending SEI data in voice call scenarios.
|
|
3512
3580
|
*   - SEI messages cannot be used on iOS devices.
|
|
3513
|
-
* + In voice call scenarios, you still need to publish and subscribe to video streams, instead of audio streams
|
|
3514
|
-
*   - The publisher can enable automatic publishing when entering the room, or call [publishStream](#publishstream) with the media stream type `AUDIO_AND_VIDEO`.
|
|
3515
|
-
*   - The subsciber can enable automatic subscribing to video streams when entering the room, or call [subscribeStream](#subscribestream) with the media stream type `AUDIO_AND_VIDEO`.
|
|
3581
|
+
* + In voice call scenarios, you still need to publish and subscribe to video streams, instead of audio streams. The subsciber can enable automatic subscribing to video streams when entering the room, or call [subscribeStream](#subscribestream) with the media stream type `AUDIO_AND_VIDEO`.
|
|
3516
3582
|
* + In voice call scenarios, if no SEI data is sent within 1 minute after calling this interface, the SDK will automatically cancel the publication of the black frame video stream.
|
|
3517
|
-
* + After the message is sent successfully, the remote end will receive [onSEIMessageReceived](104479#onseimessagereceived).
|
|
3518
|
-
* + In voice call scenarios, the sending status of the black frame video stream will be notified to remote users through the [onSEIStreamUpdate](104479#onseistreamupdate) event.
|
|
3583
|
+
* + After the message is sent successfully, the remote end will receive [onSEIMessageReceived](docs-104479#onseimessagereceived).
|
|
3584
|
+
* + In voice call scenarios, the sending status of the black frame video stream will be notified to remote users through the [onSEIStreamUpdate](docs-104479#onseistreamupdate) event.
|
|
3519
3585
|
* @group Message
|
|
3520
3586
|
* @order 10
|
|
3521
3587
|
*/
|
|
@@ -3530,7 +3596,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3530
3596
|
* @notes + Before calling this method, the SDK defaults to publishing a stream with a resolution of 640 × 480 pixels, a frame rate of 15 FPS, and a maximum encoding bitrate of 600 Kbps.
|
|
3531
3597
|
* + When publishing a single stream, you can call this method before or after publishing the video stream. After the video stream is published, dynamic switching between single stream and multiple streams is not supported, and modifying the parameters of the published multiple streams is not supported.
|
|
3532
3598
|
* + When using a mobile device to publish a video stream in portrait mode, the set resolution width and height are reversed in the actual streaming parameters. For example, when setting the sending resolution to 640 × 480 pixels, the actual streaming parameters are 480 × 640 pixels.
|
|
3533
|
-
* + If the set parameters are not supported by the browser, the RTC SDK will capture and encode based on the parameter range supported by the browser, and notify the actual parameters through the [onLocalVideoSizeChanged](104479#onlocalvideosizechanged) callback.
|
|
3599
|
+
* + If the set parameters are not supported by the browser, the RTC SDK will capture and encode based on the parameter range supported by the browser, and notify the actual parameters through the [onLocalVideoSizeChanged](docs-104479#onlocalvideosizechanged) callback.
|
|
3534
3600
|
* + If you want to simulcast, you need to disable automatic publishing, call this method and [enableSimulcastMode](#enablesimulcastmode) to enable multiple stream mode, and then call [publishStream](#publishstream) to manually publish the audio and video streams.
|
|
3535
3601
|
* + If this method is called to set multiple resolutions but multiple stream mode is not enabled, the SDK will default to publishing the stream with the highest resolution. If multiple stream publishing is enabled but only one set of stream parameters is set, the SDK will automatically fill in 1-2 sets of small stream parameters.
|
|
3536
3602
|
* + This method is applicable to video streams captured by the camera. For setting the screen sharing stream parameters, refer to [setScreenEncoderConfig](#setscreenencoderconfig).
|
|
@@ -3541,7 +3607,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3541
3607
|
|
|
3542
3608
|
/**
|
|
3543
3609
|
* @brief Set the encoding configuration of the screen-sharing stream,which is also applied in video capture.
|
|
3544
|
-
* If the configuration is not supported by your browser, the video will be captured based on the supported configuration. You will also receive the callback [onLocalVideoSizeChanged](104479#onlocalvideosizechanged).
|
|
3610
|
+
* If the configuration is not supported by your browser, the video will be captured based on the supported configuration. You will also receive the callback [onLocalVideoSizeChanged](docs-104479#onlocalvideosizechanged).
|
|
3545
3611
|
* @param description The encoding configuration of the screen-sharing stream.
|
|
3546
3612
|
* @notes + The default parameters are 1920 × 1080 px, 15 FPS, with 3000 Kbps max bitrate.
|
|
3547
3613
|
* + We recommend that you set the encoding configuration before video capture. Otherwise, the video will be captured based on the default configuration.
|
|
@@ -3569,7 +3635,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3569
3635
|
* + `false`: Failure.
|
|
3570
3636
|
* @notes + You must call this API before publishing the video streams.
|
|
3571
3637
|
* + After enabling the simulcast mode, SDK automatically sets the encoding parameters for the video streams. For manual setting, call [setVideoEncoderConfig](#setvideoencoderconfig).
|
|
3572
|
-
* +
|
|
3638
|
+
* + Simulcast is not available on Firefox.
|
|
3573
3639
|
* @group Audio & Video Transport
|
|
3574
3640
|
* @order 25
|
|
3575
3641
|
*/
|
|
@@ -3580,7 +3646,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3580
3646
|
* @deprecated since 4.42, use enableAudioPropertiesReport instead
|
|
3581
3647
|
* @brief Turn on/off volume prompts. Off by default.
|
|
3582
3648
|
* Call this API to set the report period of the volume information of local user and each subscribed user.
|
|
3583
|
-
* Local client will get informed of the the volume of local user and each subscribed users via [onAudioVolumeIndication](104479#onaudiovolumeindication).
|
|
3649
|
+
* Local client will get informed of the the volume of local user and each subscribed users via [onAudioVolumeIndication](docs-104479#onaudiovolumeindication).
|
|
3584
3650
|
* @param interval The time interval for receiving a volume prompt callback.
|
|
3585
3651
|
* It is recommended to set to greater than or equal to 200 milliseconds; when less than 10 milliseconds, the behavior is undefined.
|
|
3586
3652
|
* + `≤ 0`: Disable the volume prompt function.
|
|
@@ -3592,8 +3658,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3592
3658
|
* @brief Enable audio information prompts.
|
|
3593
3659
|
* @param config Audio information prompts-related configurations.
|
|
3594
3660
|
* @notes With the prompt on, you can:
|
|
3595
|
-
* + Get the information of the audio stream captured by the local microphone and screen audio stream through [onLocalAudioPropertiesReport](104479#onlocalaudiopropertiesreport).
|
|
3596
|
-
* + Get the information of the subscribed remote audio streams through [onRemoteAudioPropertiesReport](104479#onremoteaudiopropertiesreport).
|
|
3661
|
+
* + Get the information of the audio stream captured by the local microphone and screen audio stream through [onLocalAudioPropertiesReport](docs-104479#onlocalaudiopropertiesreport).
|
|
3662
|
+
* + Get the information of the subscribed remote audio streams through [onRemoteAudioPropertiesReport](docs-104479#onremoteaudiopropertiesreport).
|
|
3597
3663
|
* @group Audio Management
|
|
3598
3664
|
* @order 35
|
|
3599
3665
|
*/
|
|
@@ -3604,8 +3670,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3604
3670
|
* @param transcode Configurations to be set when pushing media streams to CDN.
|
|
3605
3671
|
* @return
|
|
3606
3672
|
* @notes + Before calling this API,you need to enable Push to CDN on the [console](https://console.byteplus.com/rtc/workplaceRTC).
|
|
3607
|
-
* + After calling this API, you will receive the pushing a mixed stream to CDN events via [onStreamMixingEvent](104479#onstreammixingevent).
|
|
3608
|
-
* + If you have subscribed to the push-to-CDN server callback in the [console](https://console.byteplus.com/rtc/cloudRTC?tab=callback), calling this API will receive a [TranscodeStarted](https://docs.byteplus.com/en/byteplus-rtc/docs
|
|
3673
|
+
* + After calling this API, you will receive the pushing a mixed stream to CDN events via [onStreamMixingEvent](docs-104479#onstreammixingevent).
|
|
3674
|
+
* + If you have subscribed to the push-to-CDN server callback in the [console](https://console.byteplus.com/rtc/cloudRTC?tab=callback), calling this API will receive a [TranscodeStarted](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-75125#transcodestarted) server callback notification. When calling this API repeatedly, subsequent calls to this API will trigger both [TranscodeStarted](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-75125#transcodestarted) and [TranscodeUpdated](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-75125#transcodeupdated) callbacks.
|
|
3609
3675
|
* + Call [stopLiveTranscoding](#stoplivetranscoding) to stop pushing mixed streams to CDN.
|
|
3610
3676
|
* @group Push to CDN
|
|
3611
3677
|
* @order 5
|
|
@@ -3614,8 +3680,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3614
3680
|
|
|
3615
3681
|
/**
|
|
3616
3682
|
* @brief Update configuration needed when pushing media streams to CDN.
|
|
3617
|
-
* After calling [startLiveTranscoding](104478#startlivetranscoding) to enable the function of pushing streams to CDN, you can call this API to update the relevant configurations.
|
|
3618
|
-
* @param transcode Updated configurations. Some of the configurations cannot be updated. See [LiveTranscodeConfig](104481#livetranscodeconfig) for specific indications.
|
|
3683
|
+
* After calling [startLiveTranscoding](docs-104478#startlivetranscoding) to enable the function of pushing streams to CDN, you can call this API to update the relevant configurations.
|
|
3684
|
+
* @param transcode Updated configurations. Some of the configurations cannot be updated. See [LiveTranscodeConfig](docs-104481#livetranscodeconfig) for specific indications.
|
|
3619
3685
|
* @return
|
|
3620
3686
|
* @group Push to CDN
|
|
3621
3687
|
* @order 6
|
|
@@ -3624,7 +3690,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3624
3690
|
|
|
3625
3691
|
/**
|
|
3626
3692
|
* @brief Stop pushing media streams to CDN
|
|
3627
|
-
* For starting pushing media streams to CDN. Refer to [startLiveTranscoding](104478#startlivetranscoding).
|
|
3693
|
+
* For starting pushing media streams to CDN. Refer to [startLiveTranscoding](docs-104478#startlivetranscoding).
|
|
3628
3694
|
* @return
|
|
3629
3695
|
* @group Push to CDN
|
|
3630
3696
|
* @order 7
|
|
@@ -3646,15 +3712,15 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3646
3712
|
|
|
3647
3713
|
/**
|
|
3648
3714
|
* @brief Set user visibility. The local user is visible to others by default before calling this API.
|
|
3649
|
-
* An RTC room can accommodate a maximum of 50 visible users, and 30 media streams can be published simultaneously. For more information, see [Room Capability](257549).
|
|
3715
|
+
* An RTC room can accommodate a maximum of 50 visible users, and 30 media streams can be published simultaneously. For more information, see [Room Capability](docs-257549).
|
|
3650
3716
|
* @param enable Visibility of the user in the room.
|
|
3651
3717
|
*   + `true`: The user can publish media streams. And the other users in the room get informed of the behaviors of the user, such as joining room, starting video capture, and leaving room.
|
|
3652
3718
|
*   + `false`: The user cannot publish media streams. And the other users in the room do not get informed of the behaviors of the user, such as joining, starting video capture, or leaving.
|
|
3653
3719
|
* @return
|
|
3654
3720
|
* @notes + You can call this API whether the user is in a room or not.
|
|
3655
3721
|
* + When you call this API, the other users in the room will be informed via the related callback:
|
|
3656
|
-
* - Switch from `false` to `true`: [onUserJoined](104479#onuserjoined)
|
|
3657
|
-
* - Switch from `true` to `false`: [onUserLeave](104479#onuserleave)
|
|
3722
|
+
* - Switch from `false` to `true`: [onUserJoined](docs-104479#onuserjoined)
|
|
3723
|
+
* - Switch from `true` to `false`: [onUserLeave](docs-104479#onuserleave)
|
|
3658
3724
|
* @group Room Management
|
|
3659
3725
|
* @order 10
|
|
3660
3726
|
*/
|
|
@@ -3662,22 +3728,22 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3662
3728
|
|
|
3663
3729
|
/**
|
|
3664
3730
|
* @brief Set a custom videoTrack as the video source.
|
|
3665
|
-
* Before calling this API, you must call [setVideoSourceType](104478#setvideosourcetype) to enable custom video capture.
|
|
3731
|
+
* Before calling this API, you must call [setVideoSourceType](docs-104478#setvideosourcetype) to enable custom video capture.
|
|
3666
3732
|
* @param index specify a stream index.
|
|
3667
3733
|
* @param track specify a video track. See [MediaStreamTrack](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack).
|
|
3668
3734
|
* @return
|
|
3669
|
-
* @group
|
|
3670
|
-
* @order
|
|
3735
|
+
* @group Custom Stream Processing
|
|
3736
|
+
* @order 5
|
|
3671
3737
|
*/
|
|
3672
3738
|
setExternalVideoTrack: (index: StreamIndex, track: MediaStreamTrack) => Promise<void>;
|
|
3673
3739
|
|
|
3674
3740
|
/**
|
|
3675
3741
|
* @brief Set a custom audioTrack as the audio source.
|
|
3676
|
-
* Before calling this API, you must call [setAudioSourceType](104478#setaudiosourcetype) to enable custom video capture.
|
|
3742
|
+
* Before calling this API, you must call [setAudioSourceType](docs-104478#setaudiosourcetype) to enable custom video capture.
|
|
3677
3743
|
* @param index specify a stream index.
|
|
3678
3744
|
* @param track specify an audio track. See [MediaStreamTrack](https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack).
|
|
3679
3745
|
* @return
|
|
3680
|
-
* @group
|
|
3746
|
+
* @group Custom Stream Processing
|
|
3681
3747
|
* @order 15
|
|
3682
3748
|
*/
|
|
3683
3749
|
setExternalAudioTrack: (index: StreamIndex, track: MediaStreamTrack) => Promise<void>;
|
|
@@ -3688,8 +3754,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3688
3754
|
* @param index audio stream index
|
|
3689
3755
|
* @param videoSourceType Type of the module for video capture
|
|
3690
3756
|
* @return
|
|
3691
|
-
* @group
|
|
3692
|
-
* @order
|
|
3757
|
+
* @group Custom Stream Processing
|
|
3758
|
+
* @order 0
|
|
3693
3759
|
*/
|
|
3694
3760
|
setVideoSourceType: (index: StreamIndex, videoSourceType: VideoSourceType) => Promise<void>;
|
|
3695
3761
|
|
|
@@ -3699,7 +3765,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3699
3765
|
* @param index audio stream index
|
|
3700
3766
|
* @param audioSourceType Type of the module for video capture
|
|
3701
3767
|
* @return
|
|
3702
|
-
* @group
|
|
3768
|
+
* @group Custom Stream Processing
|
|
3703
3769
|
* @order 10
|
|
3704
3770
|
*/
|
|
3705
3771
|
setAudioSourceType: (index: StreamIndex, audioSourceType: AudioSourceType) => Promise<void>;
|
|
@@ -3727,7 +3793,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3727
3793
|
* @deprecated since v4.51, use setVideoEncoderConfig instead.
|
|
3728
3794
|
* @brief Configure the internal video capture. Different browser has its own default settings.
|
|
3729
3795
|
* @param config Configuration for internal video capture. See [MediaTrackConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints).
|
|
3730
|
-
* The input `frameRate`, `height`, `width` are only desired values. The true resolution and framerate of the internal capture are the return values of [startVideoCapture](104478#startvideocapture).
|
|
3796
|
+
* The input `frameRate`, `height`, `width` are only desired values. The true resolution and framerate of the internal capture are the return values of [startVideoCapture](docs-104478#startvideocapture).
|
|
3731
3797
|
* @return
|
|
3732
3798
|
* @note + You can call this API after creating the engine. We recommend to call this API before [startVideoCapture](#startvideocapture).
|
|
3733
3799
|
* + Since v4.51, the scaling ratio of capturing resolution to encoding resolution is fixed to 1. When the capturing resolution is modified, the actual sending resolution will be changed at the same time.
|
|
@@ -3739,7 +3805,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3739
3805
|
* Call this method before users within the same `appID` can communicate with each other via messages.
|
|
3740
3806
|
* @param token Token for authentication.
|
|
3741
3807
|
* During testing, you can use generate a temporary Token on [Console](https://console.byteplus.com/auth/login), and fill in any value with `roomId`.
|
|
3742
|
-
* To officially go live, you need to use the implement token generation at your server. The `roomId` field should be empty. See [Authentication with Token](70121).
|
|
3808
|
+
* To officially go live, you need to use the implement token generation at your server. The `roomId` field should be empty. See [Authentication with Token](docs-70121).
|
|
3743
3809
|
* @param userId User ID.
|
|
3744
3810
|
* @return + `ALREADY_LOGIN`: The user has already logged in.
|
|
3745
3811
|
* + `LOGIN_FAILED`: Login failed. Please check the returned message for the specific reason.
|
|
@@ -3751,7 +3817,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3751
3817
|
login: (token: string | null, userId: string) => Promise<void>;
|
|
3752
3818
|
|
|
3753
3819
|
/**
|
|
3754
|
-
* @brief After calling this API to logout you are not able to call APIs to send messages and server messages.
|
|
3820
|
+
* @brief Log out of the RTS service. After calling this API to logout you are not able to call APIs to send messages and server messages.
|
|
3755
3821
|
* @return
|
|
3756
3822
|
* @group Message
|
|
3757
3823
|
* @order 16
|
|
@@ -3789,7 +3855,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3789
3855
|
* + `NOT_LOGIN`: The sender has not logged in yet.
|
|
3790
3856
|
* + `USER_MESSAGE_UNKNOWN`: Unknown error.
|
|
3791
3857
|
* @notes + Call [login](#login) before calling this API.
|
|
3792
|
-
* + The recipient must be logged into the server and will receive the text message via [onUserMessageReceivedOutsideRoom](104479#onusermessagereceivedoutsideroom) if the message has been sent successfully.
|
|
3858
|
+
* + The recipient must be logged into the server and will receive the text message via [onUserMessageReceivedOutsideRoom](docs-104479#onusermessagereceivedoutsideroom) if the message has been sent successfully.
|
|
3793
3859
|
* @group Message
|
|
3794
3860
|
* @order 30
|
|
3795
3861
|
*/
|
|
@@ -3805,21 +3871,21 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3805
3871
|
* + `NOT_LOGIN`: The sender has not logged in yet.
|
|
3806
3872
|
* + `USER_MESSAGE_UNKNOWN`: Unknown error.
|
|
3807
3873
|
* @notes + Call [login](#login) before calling this API.
|
|
3808
|
-
* + The recipient must be logged into the server and will receive the text message via [EngineEventsTypes.onUserBinaryMessageReceivedOutsideRoom](104479#onuserbinarymessagereceivedoutsideroom) if the message has been sent successfully.
|
|
3874
|
+
* + The recipient must be logged into the server and will receive the text message via [EngineEventsTypes.onUserBinaryMessageReceivedOutsideRoom](docs-104479#onuserbinarymessagereceivedoutsideroom) if the message has been sent successfully.
|
|
3809
3875
|
* @group Message
|
|
3810
3876
|
* @order 31
|
|
3811
3877
|
*/
|
|
3812
3878
|
sendUserBinaryMessageOutsideRoom: (userId: string, message: ArrayBuffer) => Promise<any>;
|
|
3813
3879
|
|
|
3814
3880
|
/**
|
|
3815
|
-
* @brief Set the params of the server before calling [sendServerMessage](104478#sendservermessage) or [sendServerBinaryMessage](104478#sendserverbinarymessage) to send messages to the server.
|
|
3881
|
+
* @brief Set the params of the server before calling [sendServerMessage](docs-104478#sendservermessage) or [sendServerBinaryMessage](docs-104478#sendserverbinarymessage) to send messages to the server.
|
|
3816
3882
|
* @param signature Dynamic signature. The App server may use the signature to verify the source of messages.
|
|
3817
3883
|
* You need to define the signature yourself. It can be any non-empty string. It is recommended to encode information such as UID into the signature.
|
|
3818
3884
|
* The signature will be sent to the address set through the "url" parameter in the form of a POST request.
|
|
3819
3885
|
* @param url Address of the IM server
|
|
3820
3886
|
* @return
|
|
3821
3887
|
* @notes + Call [login](#login) before calling this API.
|
|
3822
|
-
* + [onServerParamsSetResult](104479#onserverparamssetresult) notifies you whether the setting successes.
|
|
3888
|
+
* + [onServerParamsSetResult](docs-104479#onserverparamssetresult) notifies you whether the setting successes.
|
|
3823
3889
|
* @group Message
|
|
3824
3890
|
* @order 35
|
|
3825
3891
|
*/
|
|
@@ -3864,7 +3930,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3864
3930
|
* @param cloudProxyInfo cloud proxy informarion list.
|
|
3865
3931
|
* @notes + Call this API before joining the room.
|
|
3866
3932
|
* + Start pre-call network detection after starting cloud proxy.
|
|
3867
|
-
* + After starting cloud proxy and connects the cloud proxy server successfully, receives [onCloudProxyConnected](104479#oncloudproxyconnected).
|
|
3933
|
+
* + After starting cloud proxy and connects the cloud proxy server successfully, receives [onCloudProxyConnected](docs-104479#oncloudproxyconnected).
|
|
3868
3934
|
* + To stop cloud proxy, call [stopCloudProxy](#stopcloudproxy).
|
|
3869
3935
|
*/
|
|
3870
3936
|
startCloudProxy: (cloudProxyInfo: CloudProxyInfo) => void;
|
|
@@ -3894,7 +3960,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3894
3960
|
|
|
3895
3961
|
/**
|
|
3896
3962
|
* @brief Update the properties of the public stream published by the current user.
|
|
3897
|
-
* Call [startPushPublicStream](104478#startpushpublicstream) to start publishing a public stream.
|
|
3963
|
+
* Call [startPushPublicStream](docs-104478#startpushpublicstream) to start publishing a public stream.
|
|
3898
3964
|
* @param publicStreamId The public stream's ID.
|
|
3899
3965
|
* The public stream must be published by the current user.
|
|
3900
3966
|
* @param publicStreamParam The public stream's parameters.
|
|
@@ -3907,7 +3973,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3907
3973
|
/**
|
|
3908
3974
|
* @type api
|
|
3909
3975
|
* @brief Stops publishing the public stream.
|
|
3910
|
-
* Call [startPushPublicStream](104478#startpushpublicstream) to start publishing a public stream.
|
|
3976
|
+
* Call [startPushPublicStream](docs-104478#startpushpublicstream) to start publishing a public stream.
|
|
3911
3977
|
* @param publicStreamId The public stream's ID.
|
|
3912
3978
|
* The public stream must be published by the current user.
|
|
3913
3979
|
* @return
|
|
@@ -3923,8 +3989,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3923
3989
|
* If the designated stream is not published when you call this API, you will receive the public stream once it is published.
|
|
3924
3990
|
* @return
|
|
3925
3991
|
* @notes + Before calling this API, we recommend that you call [setPublicStreamVideoPlayer](#setpublicstreamvideoplayer) first to set the player information and rendering mode for the public stream.
|
|
3926
|
-
* + After calling this API, you will receive [onFirstPublicStreamVideoFrameDecoded](104479#onfirstpublicstreamvideoframedecoded) and [onFirstPublicStreamAudioFrameDecoded](104479#onfirstpublicstreamaudioframedecoded) once the first frame has been decoded.
|
|
3927
|
-
* + If the public stream contains SEI message, you will receive the message by be informed through [onPublicStreamSEIMessageReceived](104479#onpublicstreamseimessagereceived).
|
|
3992
|
+
* + After calling this API, you will receive [onFirstPublicStreamVideoFrameDecoded](docs-104479#onfirstpublicstreamvideoframedecoded) and [onFirstPublicStreamAudioFrameDecoded](docs-104479#onfirstpublicstreamaudioframedecoded) once the first frame has been decoded.
|
|
3993
|
+
* + If the public stream contains SEI message, you will receive the message by be informed through [onPublicStreamSEIMessageReceived](docs-104479#onpublicstreamseimessagereceived).
|
|
3928
3994
|
* + Call [stopPlayPublicStream](#stopplaypublicstream) to unsubscribing from the public stream.
|
|
3929
3995
|
* @group Public Stream
|
|
3930
3996
|
* @order 5
|
|
@@ -3933,7 +3999,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3933
3999
|
|
|
3934
4000
|
/**
|
|
3935
4001
|
* @brief Unsubscribes from a designated public stream.
|
|
3936
|
-
* Call [startPlayPublicStream](104478#startplaypublicstream) to subscribe to the public stream.
|
|
4002
|
+
* Call [startPlayPublicStream](docs-104478#startplaypublicstream) to subscribe to the public stream.
|
|
3937
4003
|
* @param publicStreamId The public stream's ID.
|
|
3938
4004
|
* @return
|
|
3939
4005
|
* @group Public Stream
|
|
@@ -3948,7 +4014,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3948
4014
|
* @group Public Stream
|
|
3949
4015
|
* @order 10
|
|
3950
4016
|
*/
|
|
3951
|
-
setPublicStreamVideoPlayer: (publicStreamId: string, videoPlayerOption: Omit<VideoPlayerOption, "userId">) => void;
|
|
4017
|
+
setPublicStreamVideoPlayer: (publicStreamId: string, videoPlayerOption: Omit<VideoPlayerOption, "userId" | "playerId">) => void;
|
|
3952
4018
|
|
|
3953
4019
|
/**
|
|
3954
4020
|
* @brief Set the placeholder image during local video capture pause
|
|
@@ -3979,7 +4045,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3979
4045
|
* @return + `true` Success
|
|
3980
4046
|
* + `false` Failure
|
|
3981
4047
|
* @notes + You must call this API before joining the room.
|
|
3982
|
-
* + After you enable the fallback, you will receive [onSimulcastSubscribeFallback](104479#onsimulcastsubscribefallback) and [onRemoteVideoSizeChanged](104479#onremotevideosizechanged) when the resolution of your subscribed stream is lowered or restored.
|
|
4048
|
+
* + After you enable the fallback, you will receive [onSimulcastSubscribeFallback](docs-104479#onsimulcastsubscribefallback) and [onRemoteVideoSizeChanged](docs-104479#onremotevideosizechanged) when the resolution of your subscribed stream is lowered or restored.
|
|
3983
4049
|
* + You can set media stream fallback using API or cloud configuration. The latter takes a higher priority.
|
|
3984
4050
|
* @group Audio & Video Transport
|
|
3985
4051
|
* @order 30
|
|
@@ -3988,7 +4054,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
3988
4054
|
|
|
3989
4055
|
/**
|
|
3990
4056
|
* @brief Set the priority of the remote user's media stream.
|
|
3991
|
-
* Use this API with [setSubscribeFallbackOption](104478#setsubscribefallbackoption).
|
|
4057
|
+
* Use this API with [setSubscribeFallbackOption](docs-104478#setsubscribefallbackoption).
|
|
3992
4058
|
* With video stream fallback enabled and user priority specified, the stream quality of higher priority user is the last to be compromised.
|
|
3993
4059
|
* @param userId The ID of the remote user
|
|
3994
4060
|
* @param priority The priority of the remote user's media stream
|
|
@@ -4000,7 +4066,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4000
4066
|
setRemoteUserPriority: (userId: string, priority: RemoteUserPriority) => boolean;
|
|
4001
4067
|
|
|
4002
4068
|
/**
|
|
4003
|
-
* @brief Start the playback test for the local audio device. RTC will start playing the audio file specified. And RTC will notify the audio volume via the [onAudioPlaybackDeviceTestVolume](104479#onaudioplaybackdevicetestvolume) periodically.
|
|
4069
|
+
* @brief Start the playback test for the local audio device. RTC will start playing the audio file specified. And RTC will notify the audio volume via the [onAudioPlaybackDeviceTestVolume](docs-104479#onaudioplaybackdevicetestvolume) periodically.
|
|
4004
4070
|
* @param filePath Specify the path of the audio file for the playback test, including *.wav and *.mp3.
|
|
4005
4071
|
* @param indicationInterval The time interval between each callback in milliseconds. We recommend setting it to 200 ms. The minimal value is 100 ms.
|
|
4006
4072
|
* @return Resolve when the test ends.
|
|
@@ -4022,8 +4088,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4022
4088
|
|
|
4023
4089
|
/**
|
|
4024
4090
|
* @brief Start the capture and playback test for local audio devices.
|
|
4025
|
-
* We recommend to register [onLocalAudioPropertiesReport](104479#onlocalaudiopropertiesreport) callback via [enableAudioPropertiesReport](104478#enableaudiopropertiesreport). Once the test starts, you can get the volume of the capturing audio by this callback.
|
|
4026
|
-
* @param indicationInterval The time interval between each callback of [onAudioPlaybackDeviceTestVolume](104479#onaudioplaybackdevicetestvolume) via which you get informed of the playback volume during the test. We recommend setting it to 200 ms. The minimal value is 100 ms.
|
|
4091
|
+
* We recommend to register [onLocalAudioPropertiesReport](docs-104479#onlocalaudiopropertiesreport) callback via [enableAudioPropertiesReport](docs-104478#enableaudiopropertiesreport). Once the test starts, you can get the volume of the capturing audio by this callback.
|
|
4092
|
+
* @param indicationInterval The time interval between each callback of [onAudioPlaybackDeviceTestVolume](docs-104479#onaudioplaybackdevicetestvolume) via which you get informed of the playback volume during the test. We recommend setting it to 200 ms. The minimal value is 100 ms.
|
|
4027
4093
|
* @param onAutoplayFailed Autoplay fails due to the limitation of the browser. We recommend to execute `resume` as soon as the user clicks on the UI element.
|
|
4028
4094
|
* @return Resolve when the test ends.
|
|
4029
4095
|
* The following error codes may be returned.
|
|
@@ -4043,15 +4109,15 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4043
4109
|
|
|
4044
4110
|
/**
|
|
4045
4111
|
* @brief Call this API to stop recording in the test and start to play the recording.
|
|
4046
|
-
* After calling [startAudioDeviceRecordTest](104478#startaudiodevicerecordtest), you need to call this API within 30 seconds. Otherwise, the recording will automatically stop and begin playing back the recorded audio.
|
|
4047
|
-
* @notes After calling this API, the recording starts playing during which you can call [stopAudioDevicePlayTest](104478#stopaudiodeviceplaytest) to stop playing.
|
|
4112
|
+
* After calling [startAudioDeviceRecordTest](docs-104478#startaudiodevicerecordtest), you need to call this API within 30 seconds. Otherwise, the recording will automatically stop and begin playing back the recorded audio.
|
|
4113
|
+
* @notes After calling this API, the recording starts playing during which you can call [stopAudioDevicePlayTest](docs-104478#stopaudiodeviceplaytest) to stop playing.
|
|
4048
4114
|
* @group Device Management
|
|
4049
4115
|
* @order 26
|
|
4050
4116
|
*/
|
|
4051
4117
|
stopAudioDeviceRecordAndPlayTest: () => void;
|
|
4052
4118
|
|
|
4053
4119
|
/**
|
|
4054
|
-
* @brief Stop the capture and playback test for local audio devices which is started by calling [startAudioDeviceRecordTest](104478#startaudiodevicerecordtest).
|
|
4120
|
+
* @brief Stop the capture and playback test for local audio devices which is started by calling [startAudioDeviceRecordTest](docs-104478#startaudiodevicerecordtest).
|
|
4055
4121
|
* Before the test ends by itself, you can call this API to stop the recording or playing.
|
|
4056
4122
|
* @group Device Management
|
|
4057
4123
|
* @order 27
|
|
@@ -4084,11 +4150,11 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4084
4150
|
* + Callback of the MediaStreamTrack will inform you by the event of `ended` that the local media capture stops, probably caused either by an API call or the removal of devices.
|
|
4085
4151
|
* + You can get the following info from the MediaStreamTrack: video resolution, device ID, and volume. You can manage the track actions by the method of `stop` or `mute`. You can also change the properties of the stream, such as audio volume.
|
|
4086
4152
|
* + We recommend to call RTC APIs to enable your app with the following capabilities instead of using mediaStreamTrack.<br/>
|
|
4087
|
-
*   - Get the video resolution or audio volume of the local streams: [onLocalStreamStats](104479#onlocalstreamstats)
|
|
4153
|
+
*   - Get the video resolution or audio volume of the local streams: [onLocalStreamStats](docs-104479#onlocalstreamstats)
|
|
4088
4154
|
*   - Get device IDs: [enumerateDevices](#enumeratedevices)
|
|
4089
4155
|
*   - Stop capturing: [stopAudioCapture](#stopaudiocapture), [stopVideoCapture](#stopvideocapture)
|
|
4090
4156
|
* @group Custom Stream Processing
|
|
4091
|
-
* @order
|
|
4157
|
+
* @order 20
|
|
4092
4158
|
*/
|
|
4093
4159
|
getLocalStreamTrack: (streamIndex: StreamIndex, type: "video" | "audio") => MediaStreamTrack | undefined;
|
|
4094
4160
|
|
|
@@ -4105,7 +4171,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4105
4171
|
*   - Get the video resolution or audio volume of the remote streams: [onRemoteStreamStats]({{callback}}#onremotestreamstats)
|
|
4106
4172
|
*   - Unsubscribe: [unsubscribeStream](#unsubscribestream), [unsubscribeScreen](#unsubscribescreen)
|
|
4107
4173
|
* @group Custom Stream Processing
|
|
4108
|
-
* @order
|
|
4174
|
+
* @order 25
|
|
4109
4175
|
*/
|
|
4110
4176
|
getRemoteStreamTrack: (userId: string, streamIndex: StreamIndex, type: "video" | "audio") => MediaStreamTrack | undefined;
|
|
4111
4177
|
|
|
@@ -4117,14 +4183,15 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4117
4183
|
* @notes + Call this API after you start playing the public stream by calling [`stopPlayPublicStream`](#stopplaypublicstream).
|
|
4118
4184
|
* + Callback of the MediaStreamTrack will inform you the event of `ended` that the public stream stops, probably caused by the API call of [`stopPlayPublicStream`](#stopplaypublicstream).
|
|
4119
4185
|
* @group Custom Stream Processing
|
|
4120
|
-
* @order
|
|
4186
|
+
* @order 30
|
|
4121
4187
|
*/
|
|
4122
4188
|
getPublicStreamTrack: (id: string, type: "video" | "audio") => MediaStreamTrack | undefined;
|
|
4123
4189
|
|
|
4124
4190
|
/**
|
|
4125
4191
|
* @brief Take a snapshot of the local video.
|
|
4126
4192
|
* @param streamIndex The specified video stream.
|
|
4127
|
-
* @
|
|
4193
|
+
* @param playerId Player ID. An empty value indicates the default player. If the default player does not exist by then, the call will not take effect.
|
|
4194
|
+
* @notes + The snapshot is taken with all video effects on, including rotation, mirroring, virtual background.
|
|
4128
4195
|
* + You can take the snapshot either using SDK internal video capture or customized capture.
|
|
4129
4196
|
* @return `INVOKED_BEFORE_CAPTURE`: No such stream. Please make sure that the specified stream has been published.
|
|
4130
4197
|
* @group Video Snapshot
|
|
@@ -4136,6 +4203,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4136
4203
|
* @brief Take a snapshot of the remote video.
|
|
4137
4204
|
* @param id The index of the user's stream or the index of the public stream.
|
|
4138
4205
|
* @param streamIndex The specified video stream.
|
|
4206
|
+
* @param playerId Player ID. An empty value indicates the default player. If the default player does not exist by then, the call will not take effect.
|
|
4139
4207
|
* @return `STREAM_NOT_EXIST`: The target stream does not exist. Please enter the correct ID or make sure that the target stream is in the room.
|
|
4140
4208
|
* @group Video Snapshot
|
|
4141
4209
|
* @order 1
|
|
@@ -4144,7 +4212,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4144
4212
|
|
|
4145
4213
|
/**
|
|
4146
4214
|
* @brief Registers an extension.
|
|
4147
|
-
* You can use the extension to implement features such as [Beauty Effects](https://docs.byteplus.com/byteplus-rtc/docs
|
|
4215
|
+
* You can use the extension to implement features such as [Beauty Effects](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-148646), [Virtual Background](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-148647).
|
|
4148
4216
|
* @param extension The extension instance.
|
|
4149
4217
|
* @return
|
|
4150
4218
|
* @group Extensions
|
|
@@ -4155,8 +4223,8 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4155
4223
|
/**
|
|
4156
4224
|
* @hidden currently not available
|
|
4157
4225
|
* @brief Turns on subtitles.
|
|
4158
|
-
* After calling this method, you can choose between the recognition and translation modes based on your needs. In the recognition mode, the speech of the speaker in the room will be recognized and converted into captions. In the translation mode, the transcribed text will be translated.You will receive the [onSubtitleMessageReceived](104479#onsubtitlemessagereceived) callback to informs you of related information about subtitles.
|
|
4159
|
-
* After calling this method, you will receive the [onSubtitleStateChanged](104479#onsubtitlestatechanged) to inform you of whether subtitles are on.
|
|
4226
|
+
* After calling this method, you can choose between the recognition and translation modes based on your needs. In the recognition mode, the speech of the speaker in the room will be recognized and converted into captions. In the translation mode, the transcribed text will be translated.You will receive the [onSubtitleMessageReceived](docs-104479#onsubtitlemessagereceived) callback to informs you of related information about subtitles.
|
|
4227
|
+
* After calling this method, you will receive the [onSubtitleStateChanged](docs-104479#onsubtitlestatechanged) to inform you of whether subtitles are on.
|
|
4160
4228
|
* @param config Subtitle configrations.
|
|
4161
4229
|
* @return `SUBTITLE_ALREADY_ON`: Subtitle is already turned on.
|
|
4162
4230
|
* @notes + You must call this method after joining the room.
|
|
@@ -4170,7 +4238,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4170
4238
|
* @hidden currently not available
|
|
4171
4239
|
* @brief Update the source language after turning on subtitles.
|
|
4172
4240
|
* @param config Subtitle configurations.
|
|
4173
|
-
* @return After updating the configurations, you will receive the [onSubtitleStateChanged](104479#onsubtitlestatechanged) to inform you.
|
|
4241
|
+
* @return After updating the configurations, you will receive the [onSubtitleStateChanged](docs-104479#onsubtitlestatechanged) to inform you.
|
|
4174
4242
|
* @notes + You must call this method after turning on the subtitles via [startSubtitle]({{api}}#RTCEngine.startSubtitle).
|
|
4175
4243
|
* + You can set your source language to Chinese by calling `joinRoom` and importing a JSON formatted string `"source_language": "zh"` through the parameter of extraInfo, to English by importing `"source_language": "en"`, to Korean by importing `"source_language": "ko"`, and to Japanese by importing `"source_language": "ja"`. The language of your browser will be automatically set as the source language if you don't set it. If the language of your browser is not Chinese, English, or Japanese, SDK will set Chinese as the source language.
|
|
4176
4244
|
* @group Live Caption and Translation
|
|
@@ -4181,7 +4249,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4181
4249
|
/**
|
|
4182
4250
|
* @hidden currently not available
|
|
4183
4251
|
* @brief Turns off subtitles.
|
|
4184
|
-
* After calling this method, you will receive the [onSubtitleStateChanged](104479#onsubtitlestatechanged) to inform you of whether subtitles are off.
|
|
4252
|
+
* After calling this method, you will receive the [onSubtitleStateChanged](docs-104479#onsubtitlestatechanged) to inform you of whether subtitles are off.
|
|
4185
4253
|
* @group Live Caption and Translation
|
|
4186
4254
|
* @order 1
|
|
4187
4255
|
*/
|
|
@@ -4197,7 +4265,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4197
4265
|
* + `false`: Failure.
|
|
4198
4266
|
* @notes You must call this API before joining the room. Calling it afterward is invalid.
|
|
4199
4267
|
* @group Custom Stream Processing
|
|
4200
|
-
* @order
|
|
4268
|
+
* @order 35
|
|
4201
4269
|
*/
|
|
4202
4270
|
setRemoteStreamRenderSync: (sync: boolean) => boolean;
|
|
4203
4271
|
|
|
@@ -4232,7 +4300,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4232
4300
|
* For better call quality, it is recommended to set the value in range of [0, 100].
|
|
4233
4301
|
* @notes + It is recommended to set the playback volume after the playing has started.
|
|
4234
4302
|
* + If the playing has not yet started when you call this API, the setting will take effect after it starts.
|
|
4235
|
-
* + The playback volume cannot be adjusted in [Conference Mode](113547).
|
|
4303
|
+
* + The playback volume cannot be adjusted in [Conference Mode](docs-113547).
|
|
4236
4304
|
* @group Audio Management
|
|
4237
4305
|
* @order 26
|
|
4238
4306
|
*/
|
|
@@ -4251,7 +4319,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4251
4319
|
setPublicStreamVolume: (publicStreamId: string, volume: number) => void;
|
|
4252
4320
|
|
|
4253
4321
|
/**
|
|
4254
|
-
* @brief Start forwarding media stream across rooms. See [Forward media stream across rooms](https://docs.byteplus.com/en/byteplus-rtc/docs
|
|
4322
|
+
* @brief Start forwarding media stream across rooms. See [Forward media stream across rooms](https://docs.byteplus.com/en/docs/byteplus-rtc/docs-104398) for details.
|
|
4255
4323
|
* After calling [joinRoom]({{api}}#RTCEngine.joinRoom), you can call this API to publish the media stream to multiple rooms. This feature is suitable for scenarios such as co-host PK and online karaoke.
|
|
4256
4324
|
* @param forwardStreamInfos Information of the target rooms where the stream will be forwarded.
|
|
4257
4325
|
* @return Status information for forwarding media stream across rooms.
|
|
@@ -4322,7 +4390,7 @@ export interface IRTCEngine extends EnhancedEventEmitter<IEngineEvents> {
|
|
|
4322
4390
|
|
|
4323
4391
|
/**
|
|
4324
4392
|
* @brief Set the priority of the local audio stream to be published.
|
|
4325
|
-
* @param
|
|
4393
|
+
* @param audioSelectionPriority The priority of the local audio stream which defaults to be subscribable only up to the result of the Audio Selection.
|
|
4326
4394
|
* @note + You must enable Audio Selection in the RTC console before using this API. You can call this API whether the user has joined a room. Refer to [Audio Selection](https://docs.byteplus.com/byteplus-rtc/docs/113547).<br>
|
|
4327
4395
|
* + The setting is independent in each room that the user joins.
|
|
4328
4396
|
* @group Room Management
|
|
@@ -4359,7 +4427,7 @@ export interface IVERTC {
|
|
|
4359
4427
|
createBLWEngine: (appId: string, config?: EngineConfig) => IRTCEngine;
|
|
4360
4428
|
|
|
4361
4429
|
/**
|
|
4362
|
-
* @brief Call this API to destroy the IRTCEngine instance created by [createEngine](104478#createengine).
|
|
4430
|
+
* @brief Call this API to destroy the IRTCEngine instance created by [createEngine](docs-104478#createengine).
|
|
4363
4431
|
* @param engine By calling this API, this `IRTCEngine` instance and resource related will be wiped from memory. And any interaction with the media server will end.
|
|
4364
4432
|
* @notes + Before calling this API, ensure all business scenarios related to this `IRTCEngine` instance have ended.
|
|
4365
4433
|
* + Calling this API will block the main thread until it completes the exiting process. Therefore, do not include this API in a callback. Nor wait in a callback for the execution of this API in the main thread, thus causing a deadlock.
|
|
@@ -4378,9 +4446,9 @@ export interface IVERTC {
|
|
|
4378
4446
|
|
|
4379
4447
|
/**
|
|
4380
4448
|
* @brief Call this API to enumerate media devices and their IDs, such as microphones, cameras, and headsets.
|
|
4381
|
-
* Call this API to get deviceId used to specify the device when calling [setAudioPlaybackDevice](104478#setaudioplaybackdevice), [startVideoCapture](104478#startvideocapture), and [startAudioCapture](104478#startaudiocapture).
|
|
4449
|
+
* Call this API to get deviceId used to specify the device when calling [setAudioPlaybackDevice](docs-104478#setaudioplaybackdevice), [startVideoCapture](docs-104478#startvideocapture), and [startAudioCapture](docs-104478#startaudiocapture).
|
|
4382
4450
|
* @return A list of all media devices.
|
|
4383
|
-
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on before calling this API.
|
|
4451
|
+
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on via [enableDevices](docs-104478#vertc-enabledevices) before calling this API.
|
|
4384
4452
|
* @group Device Management
|
|
4385
4453
|
* @order 0
|
|
4386
4454
|
*/
|
|
@@ -4416,9 +4484,9 @@ export interface IVERTC {
|
|
|
4416
4484
|
|
|
4417
4485
|
/**
|
|
4418
4486
|
* @brief Call this API to enumerate microphone devices.
|
|
4419
|
-
* Call this API to get Device IDs used to specify the device when calling [startAudioCapture](104478#startaudiocapture) and [setAudioCaptureDevice](104478#setaudiocapturedevice).
|
|
4487
|
+
* Call this API to get Device IDs used to specify the device when calling [startAudioCapture](docs-104478#startaudiocapture) and [setAudioCaptureDevice](docs-104478#setaudiocapturedevice).
|
|
4420
4488
|
* @return A list including all microphone devices.
|
|
4421
|
-
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on before calling this API.
|
|
4489
|
+
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on [enableDevices](docs-104478#vertc-enabledevices) before calling this API.
|
|
4422
4490
|
* @group Device Management
|
|
4423
4491
|
* @order 10
|
|
4424
4492
|
*/
|
|
@@ -4426,9 +4494,9 @@ export interface IVERTC {
|
|
|
4426
4494
|
|
|
4427
4495
|
/**
|
|
4428
4496
|
* @brief Call this API to enumerate audio and video devices and their IDs, such as microphones, cameras, and headsets.
|
|
4429
|
-
* Call this API to get Device IDs used to specify the device when calling [startVideoCapture](104478#startvideocapture) and [setVideoCaptureDevice](104478#setvideocapturedevice).
|
|
4497
|
+
* Call this API to get Device IDs used to specify the device when calling [startVideoCapture](docs-104478#startvideocapture) and [setVideoCaptureDevice](docs-104478#setvideocapturedevice).
|
|
4430
4498
|
* @return A list including all camera devices.
|
|
4431
|
-
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on before calling this API.
|
|
4499
|
+
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on [enableDevices](docs-104478#vertc-enabledevices) before calling this API.
|
|
4432
4500
|
* @group Device Management
|
|
4433
4501
|
* @order 11
|
|
4434
4502
|
*/
|
|
@@ -4436,9 +4504,9 @@ export interface IVERTC {
|
|
|
4436
4504
|
|
|
4437
4505
|
/**
|
|
4438
4506
|
* @brief Call this API to enumerate audio playback devices and their IDs, such as speakers and headsets.
|
|
4439
|
-
* Call this API to get Device IDs used to specify the device when calling [setAudioPlaybackDevice](104478#setaudioplaybackdevice).
|
|
4507
|
+
* Call this API to get Device IDs used to specify the device when calling [setAudioPlaybackDevice](docs-104478#setaudioplaybackdevice).
|
|
4440
4508
|
* @return A list including all audio playback devices.
|
|
4441
|
-
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on before calling this API.
|
|
4509
|
+
* @notes Only when the browser has permission to the media devices can it enumerate the full device list. Make sure the media device access is turned on [enableDevices](docs-104478#vertc-enabledevices) before calling this API.
|
|
4442
4510
|
* @group Device Management
|
|
4443
4511
|
* @order 12
|
|
4444
4512
|
*/
|
|
@@ -4495,6 +4563,32 @@ export interface IVERTC {
|
|
|
4495
4563
|
downloadLog: (key?: string) => void;
|
|
4496
4564
|
}
|
|
4497
4565
|
|
|
4566
|
+
/**
|
|
4567
|
+
* @brief Initial publish state
|
|
4568
|
+
*/
|
|
4569
|
+
export interface InitPublishState {
|
|
4570
|
+
|
|
4571
|
+
/**
|
|
4572
|
+
* @brief Microphone audio
|
|
4573
|
+
*/
|
|
4574
|
+
audio: boolean;
|
|
4575
|
+
|
|
4576
|
+
/**
|
|
4577
|
+
* @brief Video stream captured by cameras
|
|
4578
|
+
*/
|
|
4579
|
+
video: boolean;
|
|
4580
|
+
|
|
4581
|
+
/**
|
|
4582
|
+
* @brief Computer audio
|
|
4583
|
+
*/
|
|
4584
|
+
screenAudio: boolean;
|
|
4585
|
+
|
|
4586
|
+
/**
|
|
4587
|
+
* @brief Screen recording
|
|
4588
|
+
*/
|
|
4589
|
+
screenVideo: boolean;
|
|
4590
|
+
}
|
|
4591
|
+
|
|
4498
4592
|
/**
|
|
4499
4593
|
* @brief Audio transcoding configurations. With invalid or empty input, the configurations will be set as the default values.
|
|
4500
4594
|
*/
|
|
@@ -4952,6 +5046,11 @@ export interface PlayerEvent {
|
|
|
4952
5046
|
* @brief Whether it is a screen-sharing stream
|
|
4953
5047
|
*/
|
|
4954
5048
|
isScreen?: boolean;
|
|
5049
|
+
|
|
5050
|
+
/**
|
|
5051
|
+
* @brief Player ID. An empty value indicates the default player.
|
|
5052
|
+
*/
|
|
5053
|
+
playerId?: string;
|
|
4955
5054
|
}
|
|
4956
5055
|
|
|
4957
5056
|
/**
|
|
@@ -5453,21 +5552,21 @@ export interface RoomConfig {
|
|
|
5453
5552
|
/**
|
|
5454
5553
|
* @brief Enable/disable auto-subscribe audio. Enable by default.
|
|
5455
5554
|
* This does not include the screen stream.
|
|
5456
|
-
* Call [publishStream](104478#publishstream) to publish media streams if you disable `isAutoPublish`.
|
|
5555
|
+
* Call [publishStream](docs-104478#publishstream) to publish media streams if you disable `isAutoPublish`.
|
|
5457
5556
|
*/
|
|
5458
5557
|
isAutoPublish?: boolean;
|
|
5459
5558
|
|
|
5460
5559
|
/**
|
|
5461
5560
|
* @brief Enable/disable auto-subscribe audio. Enable by default.
|
|
5462
5561
|
* This does not include the screen stream.
|
|
5463
|
-
* You can call [subscribeStream](104478#subscribestream) and [unsubscribeStream](104478#unsubscribestream) to revise the subscription after entering the room.
|
|
5562
|
+
* You can call [subscribeStream](docs-104478#subscribestream) and [unsubscribeStream](docs-104478#unsubscribestream) to revise the subscription after entering the room.
|
|
5464
5563
|
*/
|
|
5465
5564
|
isAutoSubscribeAudio?: boolean;
|
|
5466
5565
|
|
|
5467
5566
|
/**
|
|
5468
5567
|
* @brief Enable/disable auto-subscribe video. Enable by default.
|
|
5469
5568
|
* This does not include the screen stream.
|
|
5470
|
-
* You can call [subscribeStream](104478#subscribestream) and [unsubscribeStream](104478#unsubscribestream) to revise the subscription after entering the room.
|
|
5569
|
+
* You can call [subscribeStream](docs-104478#subscribestream) and [unsubscribeStream](docs-104478#unsubscribestream) to revise the subscription after entering the room.
|
|
5471
5570
|
*/
|
|
5472
5571
|
isAutoSubscribeVideo?: boolean;
|
|
5473
5572
|
|
|
@@ -5476,7 +5575,7 @@ export interface RoomConfig {
|
|
|
5476
5575
|
* @deprecated since 4.51, use setAudioProfile instead.
|
|
5477
5576
|
* @brief Room profile
|
|
5478
5577
|
* Choose an appropriate room-profile option to meet the requirement of the scenario for media encoding algorithm, video profiles, and network configurations.
|
|
5479
|
-
* Call [setAudioProfile](104478#setaudioprofile) to choose an audio quality option.
|
|
5578
|
+
* Call [setAudioProfile](docs-104478#setaudioprofile) to choose an audio quality option.
|
|
5480
5579
|
*/
|
|
5481
5580
|
roomProfileType?: RoomProfileType;
|
|
5482
5581
|
|
|
@@ -5497,6 +5596,40 @@ export interface ScreenConfig {
|
|
|
5497
5596
|
* • On macOS, you can only share audio from a tab through sharing a Chrome tab.
|
|
5498
5597
|
*/
|
|
5499
5598
|
enableAudio?: boolean;
|
|
5599
|
+
|
|
5600
|
+
/**
|
|
5601
|
+
* @brief The type of display surface (window, browser, or monitor)
|
|
5602
|
+
* For Chrome 107, Edge 107, and later versions
|
|
5603
|
+
* See [displaySurface](https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#displaySurface).
|
|
5604
|
+
*/
|
|
5605
|
+
displaySurface?: "monitor" | "browser" | "window";
|
|
5606
|
+
|
|
5607
|
+
/**
|
|
5608
|
+
* @brief Whether to include the system audio
|
|
5609
|
+
* `include`:(Default) Include.
|
|
5610
|
+
* `exclude`:Exclude.
|
|
5611
|
+
* For Chrome 107, Edge 107, and later versions on Windows
|
|
5612
|
+
* See [systemAudio](https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#systemAudio).
|
|
5613
|
+
*/
|
|
5614
|
+
systemAudio?: "include" | "exclude";
|
|
5615
|
+
|
|
5616
|
+
/**
|
|
5617
|
+
* @brief Whether to allow the user to dynamically switch the shared tab during screen-sharing.
|
|
5618
|
+
* `include`: (Default) Allow.
|
|
5619
|
+
* `exclude`: Disallow.
|
|
5620
|
+
* For Chrome 107, Edge 107, and later versions
|
|
5621
|
+
* See [surfaceSwitching](https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#surfaceSwitching).
|
|
5622
|
+
*/
|
|
5623
|
+
surfaceSwitching?: "include" | "exclude";
|
|
5624
|
+
|
|
5625
|
+
/**
|
|
5626
|
+
* @brief Whether to allow the user to select the current tab for capture.
|
|
5627
|
+
* `include`: (Default) Allow.
|
|
5628
|
+
* `exclude`: Disallow.
|
|
5629
|
+
* For Chrome 107, Edge 107, and later versions
|
|
5630
|
+
* See [selfBrowserSurface](https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#selfBrowserSurface).
|
|
5631
|
+
*/
|
|
5632
|
+
selfBrowserSurface?: "include" | "exclude";
|
|
5500
5633
|
}
|
|
5501
5634
|
|
|
5502
5635
|
/**
|
|
@@ -5563,6 +5696,8 @@ export interface SetParamInterface {
|
|
|
5563
5696
|
FALLBACK_ENCODE_CODEC: string;
|
|
5564
5697
|
SEI_TIME_OUT: number;
|
|
5565
5698
|
SEI_COUNT_FPS: number;
|
|
5699
|
+
/** 是否开启提前建连 */
|
|
5700
|
+
PRE_ICE: boolean;
|
|
5566
5701
|
}
|
|
5567
5702
|
|
|
5568
5703
|
/**
|
|
@@ -5732,6 +5867,11 @@ export interface UserConnectionEvent {
|
|
|
5732
5867
|
* @brief User information.
|
|
5733
5868
|
*/
|
|
5734
5869
|
userInfo: UserInfo;
|
|
5870
|
+
|
|
5871
|
+
/**
|
|
5872
|
+
* @brief The publish state of the media stream.
|
|
5873
|
+
*/
|
|
5874
|
+
publishState: InitPublishState;
|
|
5735
5875
|
}
|
|
5736
5876
|
|
|
5737
5877
|
/**
|
|
@@ -5761,7 +5901,7 @@ export interface UserInfo {
|
|
|
5761
5901
|
userId: string;
|
|
5762
5902
|
|
|
5763
5903
|
/**
|
|
5764
|
-
* @brief The additional information of the user, with a maximum length of 200 bytes. Remote users will receive the [onUserJoined](104479#onuserjoined).
|
|
5904
|
+
* @brief The additional information of the user, with a maximum length of 200 bytes. Remote users will receive the [onUserJoined](docs-104479#onuserjoined).
|
|
5765
5905
|
* @notes The supported character types are as follows:
|
|
5766
5906
|
* + Uppercase letters: A~ Z
|
|
5767
5907
|
* + Lowercase letters: a~ z
|
|
@@ -5849,14 +5989,21 @@ export interface VideoPlayerOption {
|
|
|
5849
5989
|
* + 26 lowercase letters a~ z
|
|
5850
5990
|
* + 10 numbers 0~ 9
|
|
5851
5991
|
* + underscore "_", at character "@", minus, number "-"
|
|
5992
|
+
* This property does not apply to the public stream.
|
|
5852
5993
|
*/
|
|
5853
5994
|
userId: string;
|
|
5854
5995
|
|
|
5855
5996
|
/**
|
|
5856
|
-
* @brief The clockwise rotation angle of the video frame, which can be set to 0, 90, 180, 270. The default value is 0, which means no rotation is applied
|
|
5857
|
-
*
|
|
5997
|
+
* @brief The clockwise rotation angle of the video frame, which can be set to 0, 90, 180, 270. The default value is 0, which means no rotation is applied.
|
|
5998
|
+
* This parameter only applies to remote video. Setting this parameter will not take effect when calling [setLocalVideoPlayer](docs-104478#rtcengine-setlocalvideoplayer).
|
|
5858
5999
|
*/
|
|
5859
6000
|
rotation?: number;
|
|
6001
|
+
|
|
6002
|
+
/**
|
|
6003
|
+
* @brief Player ID. An empty value indicates the default player.
|
|
6004
|
+
* This property does not apply to the public stream.
|
|
6005
|
+
*/
|
|
6006
|
+
playerId?: string;
|
|
5860
6007
|
}
|
|
5861
6008
|
|
|
5862
6009
|
/**
|
|
@@ -5909,7 +6056,7 @@ export interface VideoStreamDescription {
|
|
|
5909
6056
|
export interface onAudioFirstFrameDecodedEvent {
|
|
5910
6057
|
|
|
5911
6058
|
/**
|
|
5912
|
-
* @brief userId of the user published the
|
|
6059
|
+
* @brief userId of the user published the audio stream
|
|
5913
6060
|
*/
|
|
5914
6061
|
userId: string;
|
|
5915
6062
|
|
|
@@ -6035,6 +6182,11 @@ export interface onUserJoinedEvent {
|
|
|
6035
6182
|
* @brief userId of the user who is joining the room
|
|
6036
6183
|
*/
|
|
6037
6184
|
userInfo: UserInfo;
|
|
6185
|
+
|
|
6186
|
+
/**
|
|
6187
|
+
* @brief The publish state of the media stream.
|
|
6188
|
+
*/
|
|
6189
|
+
publishState: InitPublishState;
|
|
6038
6190
|
}
|
|
6039
6191
|
|
|
6040
6192
|
/**
|
|
@@ -6098,6 +6250,12 @@ export interface onVideoFirstFrameRenderedEvent {
|
|
|
6098
6250
|
* @brief If this event comes from a screen video stream
|
|
6099
6251
|
*/
|
|
6100
6252
|
isScreen: boolean;
|
|
6253
|
+
|
|
6254
|
+
/**
|
|
6255
|
+
* @brief Player ID. An empty value indicates the default player.
|
|
6256
|
+
* This property does not apply to the public stream.
|
|
6257
|
+
*/
|
|
6258
|
+
playerId?: string;
|
|
6101
6259
|
}
|
|
6102
6260
|
export type CoreSetParamterInterface = {
|
|
6103
6261
|
[P in keyof CoreConfigType]: CoreConfigType[P] extends number ? number | string : CoreConfigType[P];
|