@agora-js/media 4.19.1 → 4.19.3
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/AgoraRTC_N-media.esm.mjs +2 -2
- package/AgoraRTC_N-media.js +2 -2
- package/media.d.ts +53 -10
- package/package.json +3 -3
- package/rtc-sdk-media_en.d.ts +27 -3
package/media.d.ts
CHANGED
|
@@ -762,7 +762,10 @@ export declare interface CameraVideoTrackInitConfig {
|
|
|
762
762
|
/**
|
|
763
763
|
* 控制视频的编码配置。
|
|
764
764
|
*
|
|
765
|
-
*
|
|
765
|
+
* 你可以通过以下方式设置该属性:
|
|
766
|
+
* - 通过 [[VideoEncoderConfigurationPreset]] 传入 SDK 内置的编码配置。
|
|
767
|
+
* - 通过传入一个 [[VideoEncoderConfiguration]] 对象来自定义视频编码配置。
|
|
768
|
+
* - 不传或留空,使用 SDK 的默认值 `"480p_1"`(分辨率 640 × 480、帧率 15 fps、码率 500 Kbps)。
|
|
766
769
|
*/
|
|
767
770
|
/** @en
|
|
768
771
|
* The video encoder configurations.
|
|
@@ -770,6 +773,7 @@ export declare interface CameraVideoTrackInitConfig {
|
|
|
770
773
|
* You can set the video encoder configurations in either of the following ways:
|
|
771
774
|
* - Pass the preset video encoder configurations by using [[VideoEncoderConfigurationPreset]].
|
|
772
775
|
* - Pass your customized video encoder configurations by using [[VideoEncoderConfiguration]].
|
|
776
|
+
* - Leave this property empty to use the SDK's default value, `"480p_1"` (resolution: 640 × 480, frame rate: 15 fps, bitrate: 500 Kbps).
|
|
773
777
|
*/
|
|
774
778
|
encoderConfig?: VideoEncoderConfiguration | VideoEncoderConfigurationPreset;
|
|
775
779
|
/**
|
|
@@ -2222,7 +2226,7 @@ export declare interface ILocalTrack extends ITrack {
|
|
|
2222
2226
|
*
|
|
2223
2227
|
* 如果该轨道已发布,调用 `setMuted(true)` 后,远端会触发 [user-unpublished]{@link IAgoraRTCClient.event_user_unpublished} 事件。再调用 `setMuted(false)` 后,远端会触发 [user-published]{@link IAgoraRTCClient.event_user_published} 事件。
|
|
2224
2228
|
*
|
|
2225
|
-
* > - 与 {@link setEnabled} 相比,调用该方法响应速度更快且不影响视频采集状态,详见 [setEnabled 和 setMuted 有什么区别?](
|
|
2229
|
+
* > - 与 {@link setEnabled} 相比,调用该方法响应速度更快且不影响视频采集状态,详见 [setEnabled 和 setMuted 有什么区别?](http://doc.shengwang.cn/faq/integration-issues/diff-setenabled-setmuted)。
|
|
2226
2230
|
* > - `setEnabled` 和 `setMuted` 不能同时调用。
|
|
2227
2231
|
*
|
|
2228
2232
|
* @param muted 是否发送该轨道的媒体数据:
|
|
@@ -3187,9 +3191,11 @@ export declare interface ITrack extends EventEmitter {
|
|
|
3187
3191
|
/**
|
|
3188
3192
|
* 获取当前轨道的 [RTCRtpTransceiver](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver) 实例。
|
|
3189
3193
|
*
|
|
3190
|
-
*
|
|
3194
|
+
* 该方法目前主要用于视频流的[端到端加密(Beta)](https://doc.shengwang.cn/doc/rtc/javascript/advanced-features/e2e-encryption)。
|
|
3191
3195
|
*
|
|
3192
|
-
* > 如果 SDK 发生断线重连,当前轨道对应的 `RTCRtpTransceiver`
|
|
3196
|
+
* > 如果 SDK 发生断线重连,当前轨道对应的 `RTCRtpTransceiver` 实例可能会发生变化。你可以通过以下回调来获取新的 `RTCRtpTransceiver` 实例:
|
|
3197
|
+
* > - 本地轨道:["transceiver-updated"]{@link ILocalTrack.event_transceiver_updated}
|
|
3198
|
+
* > - 远端轨道:["transceiver-updated-2"]{@link IRemoteTrack.event_transceiver_updated_2}
|
|
3193
3199
|
*
|
|
3194
3200
|
* @param type 视频流的类型。详见 {@link StreamType}。
|
|
3195
3201
|
* @returns 当前轨道的 `RTCRtpTransceiver` 实例。
|
|
@@ -3199,7 +3205,9 @@ export declare interface ITrack extends EventEmitter {
|
|
|
3199
3205
|
*
|
|
3200
3206
|
* This method is currently mainly used for end-to-end encryption of video streams (Beta).
|
|
3201
3207
|
*
|
|
3202
|
-
* > If the SDK experiences a reconnection, the `RTCRtpTransceiver` instance corresponding to the current track might change. You can
|
|
3208
|
+
* > If the SDK experiences a reconnection, the `RTCRtpTransceiver` instance corresponding to the current track might change. You can obtain the new `RTCRtpTransceiver` instance through the following callbacks:
|
|
3209
|
+
* > - For a local track: ["transceiver-updated"]{@link ILocalTrack.event_transceiver_updated}
|
|
3210
|
+
* > - For a remote track: ["transceiver-updated-2"]{@link IRemoteTrack.event_transceiver_updated_2}
|
|
3203
3211
|
*
|
|
3204
3212
|
* @param type The type of the video stream. See {@link StreamType}.
|
|
3205
3213
|
* @returns The [RTCRtpTransceiver](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver) instance of the current track.
|
|
@@ -3419,7 +3427,12 @@ export declare enum LocalTrackEvents {
|
|
|
3419
3427
|
export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTrack {
|
|
3420
3428
|
readonly trackMediaType: "audio" | "video";
|
|
3421
3429
|
_player?: AgoraRTCPlayer | VideoPlayer;
|
|
3430
|
+
isUseScaleResolutionDownBy: boolean;
|
|
3422
3431
|
private _videoVisibleTimer;
|
|
3432
|
+
/**
|
|
3433
|
+
* 轮询监听stats
|
|
3434
|
+
*/
|
|
3435
|
+
protected _statsTimer: number | null;
|
|
3423
3436
|
private _previousVideoVisibleStatus;
|
|
3424
3437
|
private _clearPreviousVideoVisibleStatus;
|
|
3425
3438
|
_encoderConfig?: Partial<VideoEncoderConfiguration>;
|
|
@@ -3457,6 +3470,7 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
|
|
|
3457
3470
|
updateMediaStreamTrackResolution(): void;
|
|
3458
3471
|
protected _updatePlayerSource(): void;
|
|
3459
3472
|
protected _getDefaultPlayerConfig(): Partial<VideoPlayerConfig>;
|
|
3473
|
+
protected setSenderConfiguration(config: VideoEncoderConfiguration | VideoEncoderConfigurationPreset): Promise<void>;
|
|
3460
3474
|
updateBitrateFromProfile(): void;
|
|
3461
3475
|
getVideoElementVisibleStatus(): CheckVideoVisibleResult | undefined;
|
|
3462
3476
|
renewMediaStreamTrack(newConstraints?: MediaTrackConstraints): Promise<void>;
|
|
@@ -3465,6 +3479,7 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
|
|
|
3465
3479
|
close(): void;
|
|
3466
3480
|
clone(config?: VideoEncoderConfiguration | VideoEncoderConfigurationPreset, cloneTrack?: boolean): LocalVideoTrack;
|
|
3467
3481
|
replaceTrack(track: MediaStreamTrack, stopOldTrack: boolean): Promise<void>;
|
|
3482
|
+
startMonitorStats(): void;
|
|
3468
3483
|
private bindProcessorDestinationEvents;
|
|
3469
3484
|
private unbindProcessorDestinationEvents;
|
|
3470
3485
|
private unbindProcessorContextEvents;
|
|
@@ -3484,7 +3499,7 @@ export declare interface LocalVideoTrackStats {
|
|
|
3484
3499
|
* - `"H264"`: 视频编码格式为 H.264。
|
|
3485
3500
|
* - `"H265"`: 视频编码格式为 H.265。
|
|
3486
3501
|
* - `"VP8"`: 视频编码格式为 VP8。
|
|
3487
|
-
* - `"VP9"`:
|
|
3502
|
+
* - `"VP9"`: 视频编码格式为 VP9。
|
|
3488
3503
|
* - `"AV1X"`: 预留参数,暂不支持。
|
|
3489
3504
|
* - `"AV1"`: 预留参数,暂不支持。
|
|
3490
3505
|
*
|
|
@@ -3496,7 +3511,7 @@ export declare interface LocalVideoTrackStats {
|
|
|
3496
3511
|
* - `"H264"`: The video codec is H.264.
|
|
3497
3512
|
* - `"H265"`: The video codec is H.265.
|
|
3498
3513
|
* - `"VP8"`: The video codec is VP8.
|
|
3499
|
-
* - `"VP9"`:
|
|
3514
|
+
* - `"VP9"`: The video codec is VP9.
|
|
3500
3515
|
* - `"AV1X"`: Reserved for future use.
|
|
3501
3516
|
* - `"AV1"`: Reserved for future use.
|
|
3502
3517
|
*
|
|
@@ -4283,7 +4298,7 @@ export declare interface RemoteVideoTrackStats {
|
|
|
4283
4298
|
* - `"H264"`: 视频编码格式为 H.264。
|
|
4284
4299
|
* - `"H265"`: 视频编码格式为 H.265。
|
|
4285
4300
|
* - `"VP8"`: 视频编码格式为 VP8。
|
|
4286
|
-
* - `"VP9"`:
|
|
4301
|
+
* - `"VP9"`: 视频编码格式为 VP9。
|
|
4287
4302
|
* - `"AV1X"`: 视频编码格式为 AV1,在 Chrome M96 版本之前。
|
|
4288
4303
|
* - `"AV1"`: 视频编码格式为 AV1。
|
|
4289
4304
|
*
|
|
@@ -4295,7 +4310,7 @@ export declare interface RemoteVideoTrackStats {
|
|
|
4295
4310
|
* - `"H264"`: The video codec is H.264.
|
|
4296
4311
|
* - `"H265"`: The video codec is H.265.
|
|
4297
4312
|
* - `"VP8"`: The video codec is VP8.
|
|
4298
|
-
* - `"VP9"`:
|
|
4313
|
+
* - `"VP9"`: The video codec is VP9.
|
|
4299
4314
|
* - `"AV1X"`: Reserved for future use.
|
|
4300
4315
|
* - `"AV1"`: Reserved for future use.
|
|
4301
4316
|
*
|
|
@@ -4500,10 +4515,14 @@ export declare interface ScreenConstraintsWithElectron extends MediaTrackConstra
|
|
|
4500
4515
|
* | "720p_1" | 1280 × 720 | 5 |
|
|
4501
4516
|
* | "720p_2" | 1280 × 720 | 30 |
|
|
4502
4517
|
* | "720p_3" | 1280 × 720 | 15 |
|
|
4518
|
+
* | "720p_auto" <sup>①</sup> | 1280 × 720 | 30 |
|
|
4503
4519
|
* | "1080p" | 1920 × 1080 | 5 |
|
|
4504
4520
|
* | "1080p_1" | 1920 × 1080 | 5 |
|
|
4505
4521
|
* | "1080p_2" | 1920 × 1080 | 30 |
|
|
4506
4522
|
* | "1080p_3" | 1920 × 1080 | 15 |
|
|
4523
|
+
*
|
|
4524
|
+
* > <sup>①</sup> `"720p_auto"` 仅推荐在 Safari 上设置,用于确保能够动态调整编码分辨率,详见[发版说明](https://doc.shengwang.cn/doc/rtc/javascript/overview/release-notes)。
|
|
4525
|
+
*
|
|
4507
4526
|
*/
|
|
4508
4527
|
/** @en
|
|
4509
4528
|
* The preset video encoder configurations for screen sharing.
|
|
@@ -4522,10 +4541,13 @@ export declare interface ScreenConstraintsWithElectron extends MediaTrackConstra
|
|
|
4522
4541
|
* | "720p_1" | 1280 × 720 | 5 |
|
|
4523
4542
|
* | "720p_2" | 1280 × 720 | 30 |
|
|
4524
4543
|
* | "720p_3" | 1280 × 720 | 15 |
|
|
4544
|
+
* | "720p_auto" <sup>①</sup> | 1280 × 720 | 30 |
|
|
4525
4545
|
* | "1080p" | 1920 × 1080 | 5 |
|
|
4526
4546
|
* | "1080p_1" | 1920 × 1080 | 5 |
|
|
4527
4547
|
* | "1080p_2" | 1920 × 1080 | 30 |
|
|
4528
4548
|
* | "1080p_3" | 1920 × 1080 | 15 |
|
|
4549
|
+
*
|
|
4550
|
+
* > <sup>①</sup> `"720p_auto"` is only recommended to be set on Safari to ensure dynamic adjustment of the encoding resolution. For details, see the release notes.
|
|
4529
4551
|
*/
|
|
4530
4552
|
export declare type ScreenEncoderConfigurationPreset = keyof typeof SUPPORT_SCREEN_ENCODER_CONFIG_LIST;
|
|
4531
4553
|
|
|
@@ -4554,7 +4576,10 @@ export declare interface ScreenVideoTrackInitConfig {
|
|
|
4554
4576
|
/**
|
|
4555
4577
|
* 控制屏幕共享视频的编码配置。
|
|
4556
4578
|
*
|
|
4557
|
-
*
|
|
4579
|
+
* 你可以通过以下方式设置该属性:
|
|
4580
|
+
* - 通过 [[ScreenEncoderConfigurationPreset]] 传入 SDK 内置的编码配置。
|
|
4581
|
+
* - 通过传入一个 [[VideoEncoderConfiguration]] 对象来自定义视频编码配置。
|
|
4582
|
+
* - 不传或留空,使用 SDK 的默认值 `"1080p_2"`(分辨率 1920 × 1080、帧率 30 fps、码率 3000 Kbps)。
|
|
4558
4583
|
*/
|
|
4559
4584
|
/** @en
|
|
4560
4585
|
* The video encoder configurations for screen sharing.
|
|
@@ -4562,6 +4587,7 @@ export declare interface ScreenVideoTrackInitConfig {
|
|
|
4562
4587
|
* You can set the video encoder configurations in either of the following ways:
|
|
4563
4588
|
* - Pass the preset video encoder configurations by using [[ScreenEncoderConfigurationPreset]].
|
|
4564
4589
|
* - Pass your customized video encoder configurations by using [[VideoEncoderConfiguration]].
|
|
4590
|
+
* - Leave this property empty to use the SDK's default value, `"1080p_2"` (resolution: 1920 × 1080, frame rate: 30 fps, bitrate: 3000 Kbps).
|
|
4565
4591
|
*/
|
|
4566
4592
|
encoderConfig?: VideoEncoderConfiguration | ScreenEncoderConfigurationPreset;
|
|
4567
4593
|
/**
|
|
@@ -4868,6 +4894,15 @@ export declare interface SubscribeVideoUploadStats {
|
|
|
4868
4894
|
A_ifdsd?: string;
|
|
4869
4895
|
}
|
|
4870
4896
|
|
|
4897
|
+
export declare const SUPPORT_720P_AUTO_CONFIG_LIST: Required<{
|
|
4898
|
+
scaleResolutionDownBy: number;
|
|
4899
|
+
width: number;
|
|
4900
|
+
height: number;
|
|
4901
|
+
frameRate: number;
|
|
4902
|
+
bitrateMin: number;
|
|
4903
|
+
bitrateMax: number;
|
|
4904
|
+
}>[];
|
|
4905
|
+
|
|
4871
4906
|
/** @en
|
|
4872
4907
|
* @ignore
|
|
4873
4908
|
*/
|
|
@@ -5012,6 +5047,7 @@ export declare enum TrackInternalEvent {
|
|
|
5012
5047
|
NEED_SESSION_ID = "@need_sid",
|
|
5013
5048
|
SET_OPTIMIZATION_MODE = "@set_optimization_mode",
|
|
5014
5049
|
GET_STATS = "@get_stats",
|
|
5050
|
+
GET_RTC_STATS = "@get_rtc_stats",
|
|
5015
5051
|
GET_LOW_VIDEO_TRACK = "@get_low_video_track",
|
|
5016
5052
|
NEED_RESET_REMOTE_SDP = "@need_reset_remote_sdp",
|
|
5017
5053
|
NEED_UPDATE_VIDEO_ENCODER = "@need_update_video_encoder",
|
|
@@ -5164,6 +5200,7 @@ export declare interface VideoEncoderConfiguration {
|
|
|
5164
5200
|
* | 720p_1 | 1280 × 720 | 15 | 1130 | ✓ | ✓ | ✓ |
|
|
5165
5201
|
* | 720p_2 | 1280 × 720 | 30 | 2000 | ✓ | ✓ | ✓ |
|
|
5166
5202
|
* | 720p_3 | 1280 × 720 | 30 | 1710 | ✓ | ✓ | ✓ |
|
|
5203
|
+
* | 720p_auto <sup>①</sup> | 1280 × 720 | 30 | 3000 | ✓ | ✓ | ✓ |
|
|
5167
5204
|
* | 720p_5 | 960 × 720 | 15 | 910 | ✓ | ✓ | ✓ |
|
|
5168
5205
|
* | 720p_6 | 960 × 720 | 30 | 1380 | ✓ | ✓ | ✓ |
|
|
5169
5206
|
* | 1080p | 1920 × 1080 | 15 | 2080 | ✓ | | ✓ |
|
|
@@ -5171,6 +5208,9 @@ export declare interface VideoEncoderConfiguration {
|
|
|
5171
5208
|
* | 1080p_2 | 1920 × 1080 | 30 | 3000 | ✓ | | ✓ |
|
|
5172
5209
|
* | 1080p_3 | 1920 × 1080 | 30 | 3150 | ✓ | | ✓ |
|
|
5173
5210
|
* | 1080p_5 | 1920 × 1080 | 60 | 4780 | ✓ | | ✓ |
|
|
5211
|
+
*
|
|
5212
|
+
* > <sup>①</sup> `"720p_auto"` 仅推荐在 Safari 上设置,用于确保能够动态调整编码分辨率,详见[发版说明](https://doc.shengwang.cn/doc/rtc/javascript/overview/release-notes)。
|
|
5213
|
+
*
|
|
5174
5214
|
* @public
|
|
5175
5215
|
*/
|
|
5176
5216
|
/** @en
|
|
@@ -5217,6 +5257,7 @@ export declare interface VideoEncoderConfiguration {
|
|
|
5217
5257
|
* | 720p_1 | 1280 × 720 | 15 | 1130 | ✓ | ✓ | ✓ |
|
|
5218
5258
|
* | 720p_2 | 1280 × 720 | 30 | 2000 | ✓ | ✓ | ✓ |
|
|
5219
5259
|
* | 720p_3 | 1280 × 720 | 30 | 1710 | ✓ | ✓ | ✓ |
|
|
5260
|
+
* | 720p_auto <sup>①</sup> | 1280 × 720 | 30 | 3000 | ✓ | ✓ | ✓ |
|
|
5220
5261
|
* | 720p_5 | 960 × 720 | 15 | 910 | ✓ | ✓ | ✓ |
|
|
5221
5262
|
* | 720p_6 | 960 × 720 | 30 | 1380 | ✓ | ✓ | ✓ |
|
|
5222
5263
|
* | 1080p | 1920 × 1080 | 15 | 2080 | ✓ | | ✓ |
|
|
@@ -5224,6 +5265,8 @@ export declare interface VideoEncoderConfiguration {
|
|
|
5224
5265
|
* | 1080p_2 | 1920 × 1080 | 30 | 3000 | ✓ | | ✓ |
|
|
5225
5266
|
* | 1080p_3 | 1920 × 1080 | 30 | 3150 | ✓ | | ✓ |
|
|
5226
5267
|
* | 1080p_5 | 1920 × 1080 | 60 | 4780 | ✓ | | ✓ |
|
|
5268
|
+
*
|
|
5269
|
+
* > <sup>①</sup> `"720p_auto"` is only recommended to be set on Safari to ensure dynamic adjustment of the encoding resolution. For details, see the release notes.
|
|
5227
5270
|
*/
|
|
5228
5271
|
export declare type VideoEncoderConfigurationPreset = keyof typeof SUPPORT_VIDEO_ENCODER_CONFIG_LIST;
|
|
5229
5272
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agora-js/media",
|
|
3
|
-
"version": "4.19.
|
|
3
|
+
"version": "4.19.3",
|
|
4
4
|
"description": "media module across @agora-js packages",
|
|
5
5
|
"main": "AgoraRTC_N-media.js",
|
|
6
6
|
"module": "AgoraRTC_N-media.esm.mjs",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"homepage": "https://api-ref.agora.io/en/voice-sdk/web/4.x/index.html",
|
|
24
24
|
"peerDependencies": {},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@agora-js/shared": "^4.19.
|
|
27
|
-
"@agora-js/report": "^4.19.
|
|
26
|
+
"@agora-js/shared": "^4.19.3",
|
|
27
|
+
"@agora-js/report": "^4.19.3",
|
|
28
28
|
"axios": "^0.27.2",
|
|
29
29
|
"agora-rte-extension": "^1.2.3",
|
|
30
30
|
"webrtc-adapter": "8.2.0",
|
package/rtc-sdk-media_en.d.ts
CHANGED
|
@@ -515,6 +515,7 @@ export declare interface CameraVideoTrackInitConfig {
|
|
|
515
515
|
* You can set the video encoder configurations in either of the following ways:
|
|
516
516
|
* - Pass the preset video encoder configurations by using [[VideoEncoderConfigurationPreset]].
|
|
517
517
|
* - Pass your customized video encoder configurations by using [[VideoEncoderConfiguration]].
|
|
518
|
+
* - Leave this property empty to use the SDK's default value, `"480p_1"` (resolution: 640 × 480, frame rate: 15 fps, bitrate: 500 Kbps).
|
|
518
519
|
*/
|
|
519
520
|
encoderConfig?: VideoEncoderConfiguration | VideoEncoderConfigurationPreset;
|
|
520
521
|
/**
|
|
@@ -1948,7 +1949,9 @@ export declare interface ITrack extends EventEmitter {
|
|
|
1948
1949
|
*
|
|
1949
1950
|
* This method is currently mainly used for end-to-end encryption of video streams (Beta).
|
|
1950
1951
|
*
|
|
1951
|
-
* > If the SDK experiences a reconnection, the `RTCRtpTransceiver` instance corresponding to the current track might change. You can
|
|
1952
|
+
* > If the SDK experiences a reconnection, the `RTCRtpTransceiver` instance corresponding to the current track might change. You can obtain the new `RTCRtpTransceiver` instance through the following callbacks:
|
|
1953
|
+
* > - For a local track: ["transceiver-updated"]{@link ILocalTrack.event_transceiver_updated}
|
|
1954
|
+
* > - For a remote track: ["transceiver-updated-2"]{@link IRemoteTrack.event_transceiver_updated_2}
|
|
1952
1955
|
*
|
|
1953
1956
|
* @param type The type of the video stream. See {@link StreamType}.
|
|
1954
1957
|
* @returns The [RTCRtpTransceiver](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver) instance of the current track.
|
|
@@ -2111,7 +2114,9 @@ export declare enum LocalTrackEvents {
|
|
|
2111
2114
|
export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTrack {
|
|
2112
2115
|
readonly trackMediaType: "audio" | "video";
|
|
2113
2116
|
_player?: AgoraRTCPlayer | VideoPlayer;
|
|
2117
|
+
isUseScaleResolutionDownBy: boolean;
|
|
2114
2118
|
private _videoVisibleTimer;
|
|
2119
|
+
protected _statsTimer: number | null;
|
|
2115
2120
|
private _previousVideoVisibleStatus;
|
|
2116
2121
|
private _clearPreviousVideoVisibleStatus;
|
|
2117
2122
|
_encoderConfig?: Partial<VideoEncoderConfiguration>;
|
|
@@ -2149,6 +2154,7 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
|
|
|
2149
2154
|
updateMediaStreamTrackResolution(): void;
|
|
2150
2155
|
protected _updatePlayerSource(): void;
|
|
2151
2156
|
protected _getDefaultPlayerConfig(): Partial<VideoPlayerConfig>;
|
|
2157
|
+
protected setSenderConfiguration(config: VideoEncoderConfiguration | VideoEncoderConfigurationPreset): Promise<void>;
|
|
2152
2158
|
updateBitrateFromProfile(): void;
|
|
2153
2159
|
getVideoElementVisibleStatus(): CheckVideoVisibleResult | undefined;
|
|
2154
2160
|
renewMediaStreamTrack(newConstraints?: MediaTrackConstraints): Promise<void>;
|
|
@@ -2157,6 +2163,7 @@ export declare class LocalVideoTrack extends LocalTrack implements ILocalVideoTr
|
|
|
2157
2163
|
close(): void;
|
|
2158
2164
|
clone(config?: VideoEncoderConfiguration | VideoEncoderConfigurationPreset, cloneTrack?: boolean): LocalVideoTrack;
|
|
2159
2165
|
replaceTrack(track: MediaStreamTrack, stopOldTrack: boolean): Promise<void>;
|
|
2166
|
+
startMonitorStats(): void;
|
|
2160
2167
|
private bindProcessorDestinationEvents;
|
|
2161
2168
|
private unbindProcessorDestinationEvents;
|
|
2162
2169
|
private unbindProcessorContextEvents;
|
|
@@ -2172,7 +2179,7 @@ export declare interface LocalVideoTrackStats {
|
|
|
2172
2179
|
* - `"H264"`: The video codec is H.264.
|
|
2173
2180
|
* - `"H265"`: The video codec is H.265.
|
|
2174
2181
|
* - `"VP8"`: The video codec is VP8.
|
|
2175
|
-
* - `"VP9"`:
|
|
2182
|
+
* - `"VP9"`: The video codec is VP9.
|
|
2176
2183
|
* - `"AV1X"`: Reserved for future use.
|
|
2177
2184
|
* - `"AV1"`: Reserved for future use.
|
|
2178
2185
|
*
|
|
@@ -2701,7 +2708,7 @@ export declare interface RemoteVideoTrackStats {
|
|
|
2701
2708
|
* - `"H264"`: The video codec is H.264.
|
|
2702
2709
|
* - `"H265"`: The video codec is H.265.
|
|
2703
2710
|
* - `"VP8"`: The video codec is VP8.
|
|
2704
|
-
* - `"VP9"`:
|
|
2711
|
+
* - `"VP9"`: The video codec is VP9.
|
|
2705
2712
|
* - `"AV1X"`: Reserved for future use.
|
|
2706
2713
|
* - `"AV1"`: Reserved for future use.
|
|
2707
2714
|
*
|
|
@@ -2821,10 +2828,13 @@ export declare interface ScreenConstraintsWithElectron extends MediaTrackConstra
|
|
|
2821
2828
|
* | "720p_1" | 1280 × 720 | 5 |
|
|
2822
2829
|
* | "720p_2" | 1280 × 720 | 30 |
|
|
2823
2830
|
* | "720p_3" | 1280 × 720 | 15 |
|
|
2831
|
+
* | "720p_auto" <sup>①</sup> | 1280 × 720 | 30 |
|
|
2824
2832
|
* | "1080p" | 1920 × 1080 | 5 |
|
|
2825
2833
|
* | "1080p_1" | 1920 × 1080 | 5 |
|
|
2826
2834
|
* | "1080p_2" | 1920 × 1080 | 30 |
|
|
2827
2835
|
* | "1080p_3" | 1920 × 1080 | 15 |
|
|
2836
|
+
*
|
|
2837
|
+
* > <sup>①</sup> `"720p_auto"` is only recommended to be set on Safari to ensure dynamic adjustment of the encoding resolution. For details, see the release notes.
|
|
2828
2838
|
*/
|
|
2829
2839
|
export declare type ScreenEncoderConfigurationPreset = keyof typeof SUPPORT_SCREEN_ENCODER_CONFIG_LIST;
|
|
2830
2840
|
|
|
@@ -2846,6 +2856,7 @@ export declare interface ScreenVideoTrackInitConfig {
|
|
|
2846
2856
|
* You can set the video encoder configurations in either of the following ways:
|
|
2847
2857
|
* - Pass the preset video encoder configurations by using [[ScreenEncoderConfigurationPreset]].
|
|
2848
2858
|
* - Pass your customized video encoder configurations by using [[VideoEncoderConfiguration]].
|
|
2859
|
+
* - Leave this property empty to use the SDK's default value, `"1080p_2"` (resolution: 1920 × 1080, frame rate: 30 fps, bitrate: 3000 Kbps).
|
|
2849
2860
|
*/
|
|
2850
2861
|
encoderConfig?: VideoEncoderConfiguration | ScreenEncoderConfigurationPreset;
|
|
2851
2862
|
/**
|
|
@@ -3038,6 +3049,15 @@ export declare interface SubscribeVideoUploadStats {
|
|
|
3038
3049
|
A_ifdsd?: string;
|
|
3039
3050
|
}
|
|
3040
3051
|
|
|
3052
|
+
export declare const SUPPORT_720P_AUTO_CONFIG_LIST: Required<{
|
|
3053
|
+
scaleResolutionDownBy: number;
|
|
3054
|
+
width: number;
|
|
3055
|
+
height: number;
|
|
3056
|
+
frameRate: number;
|
|
3057
|
+
bitrateMin: number;
|
|
3058
|
+
bitrateMax: number;
|
|
3059
|
+
}>[];
|
|
3060
|
+
|
|
3041
3061
|
/**
|
|
3042
3062
|
* @ignore
|
|
3043
3063
|
*/
|
|
@@ -3137,6 +3157,7 @@ export declare enum TrackInternalEvent {
|
|
|
3137
3157
|
NEED_SESSION_ID = "@need_sid",
|
|
3138
3158
|
SET_OPTIMIZATION_MODE = "@set_optimization_mode",
|
|
3139
3159
|
GET_STATS = "@get_stats",
|
|
3160
|
+
GET_RTC_STATS = "@get_rtc_stats",
|
|
3140
3161
|
GET_LOW_VIDEO_TRACK = "@get_low_video_track",
|
|
3141
3162
|
NEED_RESET_REMOTE_SDP = "@need_reset_remote_sdp",
|
|
3142
3163
|
NEED_UPDATE_VIDEO_ENCODER = "@need_update_video_encoder",
|
|
@@ -3249,6 +3270,7 @@ export declare interface VideoEncoderConfiguration {
|
|
|
3249
3270
|
* | 720p_1 | 1280 × 720 | 15 | 1130 | ✓ | ✓ | ✓ |
|
|
3250
3271
|
* | 720p_2 | 1280 × 720 | 30 | 2000 | ✓ | ✓ | ✓ |
|
|
3251
3272
|
* | 720p_3 | 1280 × 720 | 30 | 1710 | ✓ | ✓ | ✓ |
|
|
3273
|
+
* | 720p_auto <sup>①</sup> | 1280 × 720 | 30 | 3000 | ✓ | ✓ | ✓ |
|
|
3252
3274
|
* | 720p_5 | 960 × 720 | 15 | 910 | ✓ | ✓ | ✓ |
|
|
3253
3275
|
* | 720p_6 | 960 × 720 | 30 | 1380 | ✓ | ✓ | ✓ |
|
|
3254
3276
|
* | 1080p | 1920 × 1080 | 15 | 2080 | ✓ | | ✓ |
|
|
@@ -3256,6 +3278,8 @@ export declare interface VideoEncoderConfiguration {
|
|
|
3256
3278
|
* | 1080p_2 | 1920 × 1080 | 30 | 3000 | ✓ | | ✓ |
|
|
3257
3279
|
* | 1080p_3 | 1920 × 1080 | 30 | 3150 | ✓ | | ✓ |
|
|
3258
3280
|
* | 1080p_5 | 1920 × 1080 | 60 | 4780 | ✓ | | ✓ |
|
|
3281
|
+
*
|
|
3282
|
+
* > <sup>①</sup> `"720p_auto"` is only recommended to be set on Safari to ensure dynamic adjustment of the encoding resolution. For details, see the release notes.
|
|
3259
3283
|
*/
|
|
3260
3284
|
export declare type VideoEncoderConfigurationPreset = keyof typeof SUPPORT_VIDEO_ENCODER_CONFIG_LIST;
|
|
3261
3285
|
|