trtc-sdk-v5 5.0.1 → 5.0.2-beta.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/README.md +1 -1
- package/index.d.ts +10 -10
- package/package.json +1 -1
- package/trtc.esm.js +26 -26
- package/trtc.js +1 -1
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ Explore SDK documents:[TRTC Web SDK](https://web.sdk.qcloud.com/trtc/webrtc/v5
|
|
|
67
67
|
- Turn off camera [trtc.stopLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopLocalVideo)
|
|
68
68
|
- Turn off microphone [trtc.stopLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopLocalAudio)
|
|
69
69
|
- Play remote video [trtc.startRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#startRemoteVideo)
|
|
70
|
-
- Stop playing
|
|
70
|
+
- Stop playing remote video [trtc.stopRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopRemoteVideo)
|
|
71
71
|
- Mute/unmute remote audio [trtc.muteRemoteAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#muteRemoteAudio)
|
|
72
72
|
|
|
73
73
|
## Directory
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference path="./core.d.ts" />
|
|
2
2
|
|
|
3
3
|
declare interface LocalVideoConfig {
|
|
4
|
-
view
|
|
4
|
+
view?: string | HTMLElement | HTMLElement[] | null;
|
|
5
5
|
publish?: boolean;
|
|
6
6
|
option?: {
|
|
7
7
|
cameraId?: string;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
userDefineRecordId?: string;
|
|
42
42
|
}
|
|
43
43
|
declare interface ScreenShareConfig {
|
|
44
|
-
view?: string | HTMLElement | null;
|
|
44
|
+
view?: string | HTMLElement | HTMLElement[] | null;
|
|
45
45
|
publish?: boolean;
|
|
46
46
|
option?: {
|
|
47
47
|
profile?: keyof typeof screenProfileMap | VideoProfile;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
declare interface RemoteVideoConfig {
|
|
65
|
-
view
|
|
65
|
+
view?: string | HTMLElement | HTMLElement[] | null;
|
|
66
66
|
userId: string;
|
|
67
67
|
streamType: TRTCStreamType;
|
|
68
68
|
option?: {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
declare interface UpdateRemoteVideoConfig extends Omit<RemoteVideoConfig, 'view'> {
|
|
75
|
-
view?: string | HTMLElement | null;
|
|
75
|
+
view?: string | HTMLElement | HTMLElement[] | null;
|
|
76
76
|
}
|
|
77
77
|
declare interface StopRemoteVideoConfig {
|
|
78
78
|
userId: string;
|
|
@@ -921,7 +921,7 @@
|
|
|
921
921
|
* - 一个 trtc 实例只能开启一路摄像头。若您需要在已经开启一路摄像头的情况下,再开启一路摄像头用于测试,可以创建多个 trtc 实例实现。
|
|
922
922
|
*
|
|
923
923
|
* @param {object} [config]
|
|
924
|
-
* @param {string | HTMLElement | null} [config.view] - 本地视频预览的 HTMLElement 实例或者 Id, 如果不传或传入 null, 则不会播放视频。
|
|
924
|
+
* @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 本地视频预览的 HTMLElement 实例或者 Id, 如果不传或传入 null, 则不会播放视频。
|
|
925
925
|
* @param {boolean} [config.publish] - 是否将本地视频发布到房间中。默认为 true,若在进房前调用该接口,SDK 会在进房成功后自动发布(若 publish=true)。
|
|
926
926
|
* @param {object} [config.option] - 本地视频配置
|
|
927
927
|
* @param {string} [config.option.cameraId] - 指定使用哪个摄像头,用于切换摄像头。
|
|
@@ -973,7 +973,7 @@
|
|
|
973
973
|
* - 该接口可以多次调用。
|
|
974
974
|
* - 本方法采用增量更新方式:只更新传入的参数,不传入的参数保持不变。
|
|
975
975
|
* @param {object} [config]
|
|
976
|
-
* @param {string | HTMLElement | null} [config.view] - 预览摄像头的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会推流消耗带宽的容器
|
|
976
|
+
* @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 预览摄像头的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会推流消耗带宽的容器
|
|
977
977
|
* @param {boolean} [config.publish] - 是否将本地视频发布到房间中。默认为 true,若在进房前调用该接口,SDK 会在进房成功后自动发布。
|
|
978
978
|
* @param {boolean} [config.mute] - 是否暂停摄像头采集,参考:[开关麦克风、摄像头](./tutorial-15-basic-dynamic-add-video.html)
|
|
979
979
|
* @param {object} [config.option] - 本地视频配置
|
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
*
|
|
1042
1042
|
* - 开启屏幕分享后,房间内其他用户会收到 {@link module:EVENT.REMOTE_VIDEO_AVAILABLE REMOTE_VIDEO_AVAILABLE} 事件,streamType 为 {@link module:TYPE.STREAM_TYPE_SUB STREAM_TYPE_SUB},其他用户可以通过 {@link TRTC#startRemoteVideo startRemoteVideo} 播放屏幕分享。
|
|
1043
1043
|
* @param {object} [config]
|
|
1044
|
-
* @param {string | HTMLElement | null} [config.view] - 预览本地屏幕分享的 HTMLElement 实例或 Id, 如果不传或传入 null, 则不会渲染本地屏幕分享。
|
|
1044
|
+
* @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 预览本地屏幕分享的 HTMLElement 实例或 Id, 如果不传或传入 null, 则不会渲染本地屏幕分享。
|
|
1045
1045
|
* @param {boolean} [config.publish] - 是否将屏幕分享发布到房间中。默认为 true,若在进房前调用该接口,SDK 会在进房成功后自动发布。
|
|
1046
1046
|
* @param {object} [config.option] - 屏幕分享配置
|
|
1047
1047
|
* @param {boolean} [config.option.systemAudio] - 是否采集系统声音,默认为 false。
|
|
@@ -1067,7 +1067,7 @@
|
|
|
1067
1067
|
* - 该接口可以多次调用。
|
|
1068
1068
|
* - 本方法采用增量更新方式:只更新传入的参数,不传入的参数保持不变。
|
|
1069
1069
|
* @param {object} [config]
|
|
1070
|
-
* @param {string | HTMLElement | null} [config.view] - 屏幕分享预览的 HTMLElement 实例或 Id, 如果不传或传入 null, 则不会渲染屏幕分享。
|
|
1070
|
+
* @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 屏幕分享预览的 HTMLElement 实例或 Id, 如果不传或传入 null, 则不会渲染屏幕分享。
|
|
1071
1071
|
* @param {boolean} [config.publish] - 是否将屏幕分享发布到房间中
|
|
1072
1072
|
* @param {object} [config.option] - 屏幕分享配置
|
|
1073
1073
|
* @param {'contain' | 'cover' | 'fill'} [config.option.fillMode] - 视频填充模式。默认为 `contain`,参考 {@link https://developer.mozilla.org/zh-CN/docs/Web/CSS/object-fit CSS object-fit} 属性。
|
|
@@ -1100,7 +1100,7 @@
|
|
|
1100
1100
|
*
|
|
1101
1101
|
* - 调用时机:在收到 {@link module:EVENT.REMOTE_VIDEO_AVAILABLE TRTC.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE)} 事件后调用。
|
|
1102
1102
|
* @param {object} [config]
|
|
1103
|
-
* @param {string | HTMLElement | null} [config.view] - 用于播放远端视频的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会拉流消耗带宽
|
|
1103
|
+
* @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 用于播放远端视频的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会拉流消耗带宽
|
|
1104
1104
|
* @param {string} config.userId - 远端用户Id
|
|
1105
1105
|
* @param {TRTC.TYPE.STREAM_TYPE_MAIN|TRTC.TYPE.STREAM_TYPE_SUB} config.streamType - 远端流类型
|
|
1106
1106
|
* - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: 主流(远端用户的摄像头)(远端用户的摄像头)
|
|
@@ -1129,7 +1129,7 @@
|
|
|
1129
1129
|
* - 该方法可多次调用。
|
|
1130
1130
|
* - 该方法采用增量更新的方式,只需要传入需要更新的配置项即可。
|
|
1131
1131
|
* @param {object} [config]
|
|
1132
|
-
* @param {string | HTMLElement | null} [config.view] - 用于播放远端视频的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会拉流消耗带宽
|
|
1132
|
+
* @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 用于播放远端视频的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会拉流消耗带宽
|
|
1133
1133
|
* @param {string} config.userId - 远端用户Id
|
|
1134
1134
|
* @param {TRTC.TYPE.STREAM_TYPE_MAIN|TRTC.TYPE.STREAM_TYPE_SUB} config.streamType - 远端流类型:
|
|
1135
1135
|
* - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: 主流(远端用户的摄像头)
|