trtc-sdk-v5 5.0.1 → 5.1.0-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 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 rmeote video [trtc.stopRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopRemoteVideo)
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: string | HTMLElement | HTMLElement[] | null;
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: string | HTMLElement | HTMLElement[] | null;
65
+ view?: string | HTMLElement | HTMLElement[] | null;
66
66
  userId: string;
67
67
  streamType: TRTCStreamType;
68
68
  option?: {
@@ -71,9 +71,6 @@
71
71
  small?: boolean;
72
72
  };
73
73
  }
74
- declare interface UpdateRemoteVideoConfig extends Omit<RemoteVideoConfig, 'view'> {
75
- view?: string | HTMLElement | null;
76
- }
77
74
  declare interface StopRemoteVideoConfig {
78
75
  userId: string;
79
76
  streamType?: TRTCStreamType;
@@ -921,7 +918,7 @@
921
918
  * - 一个 trtc 实例只能开启一路摄像头。若您需要在已经开启一路摄像头的情况下,再开启一路摄像头用于测试,可以创建多个 trtc 实例实现。
922
919
  *
923
920
  * @param {object} [config]
924
- * @param {string | HTMLElement | null} [config.view] - 本地视频预览的 HTMLElement 实例或者 Id, 如果不传或传入 null, 则不会播放视频。
921
+ * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 本地视频预览的 HTMLElement 实例或者 Id, 如果不传或传入 null, 则不会播放视频。
925
922
  * @param {boolean} [config.publish] - 是否将本地视频发布到房间中。默认为 true,若在进房前调用该接口,SDK 会在进房成功后自动发布(若 publish=true)。
926
923
  * @param {object} [config.option] - 本地视频配置
927
924
  * @param {string} [config.option.cameraId] - 指定使用哪个摄像头,用于切换摄像头。
@@ -973,7 +970,7 @@
973
970
  * - 该接口可以多次调用。
974
971
  * - 本方法采用增量更新方式:只更新传入的参数,不传入的参数保持不变。
975
972
  * @param {object} [config]
976
- * @param {string | HTMLElement | null} [config.view] - 预览摄像头的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会推流消耗带宽的容器
973
+ * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 预览摄像头的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会推流消耗带宽的容器
977
974
  * @param {boolean} [config.publish] - 是否将本地视频发布到房间中。默认为 true,若在进房前调用该接口,SDK 会在进房成功后自动发布。
978
975
  * @param {boolean} [config.mute] - 是否暂停摄像头采集,参考:[开关麦克风、摄像头](./tutorial-15-basic-dynamic-add-video.html)
979
976
  * @param {object} [config.option] - 本地视频配置
@@ -1041,7 +1038,7 @@
1041
1038
  *
1042
1039
  * - 开启屏幕分享后,房间内其他用户会收到 {@link module:EVENT.REMOTE_VIDEO_AVAILABLE REMOTE_VIDEO_AVAILABLE} 事件,streamType 为 {@link module:TYPE.STREAM_TYPE_SUB STREAM_TYPE_SUB},其他用户可以通过 {@link TRTC#startRemoteVideo startRemoteVideo} 播放屏幕分享。
1043
1040
  * @param {object} [config]
1044
- * @param {string | HTMLElement | null} [config.view] - 预览本地屏幕分享的 HTMLElement 实例或 Id, 如果不传或传入 null, 则不会渲染本地屏幕分享。
1041
+ * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 预览本地屏幕分享的 HTMLElement 实例或 Id, 如果不传或传入 null, 则不会渲染本地屏幕分享。
1045
1042
  * @param {boolean} [config.publish] - 是否将屏幕分享发布到房间中。默认为 true,若在进房前调用该接口,SDK 会在进房成功后自动发布。
1046
1043
  * @param {object} [config.option] - 屏幕分享配置
1047
1044
  * @param {boolean} [config.option.systemAudio] - 是否采集系统声音,默认为 false。
@@ -1067,7 +1064,7 @@
1067
1064
  * - 该接口可以多次调用。
1068
1065
  * - 本方法采用增量更新方式:只更新传入的参数,不传入的参数保持不变。
1069
1066
  * @param {object} [config]
1070
- * @param {string | HTMLElement | null} [config.view] - 屏幕分享预览的 HTMLElement 实例或 Id, 如果不传或传入 null, 则不会渲染屏幕分享。
1067
+ * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 屏幕分享预览的 HTMLElement 实例或 Id, 如果不传或传入 null, 则不会渲染屏幕分享。
1071
1068
  * @param {boolean} [config.publish] - 是否将屏幕分享发布到房间中
1072
1069
  * @param {object} [config.option] - 屏幕分享配置
1073
1070
  * @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 +1097,7 @@
1100
1097
  *
1101
1098
  * - 调用时机:在收到 {@link module:EVENT.REMOTE_VIDEO_AVAILABLE TRTC.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE)} 事件后调用。
1102
1099
  * @param {object} [config]
1103
- * @param {string | HTMLElement | null} [config.view] - 用于播放远端视频的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会拉流消耗带宽
1100
+ * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 用于播放远端视频的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会拉流消耗带宽
1104
1101
  * @param {string} config.userId - 远端用户Id
1105
1102
  * @param {TRTC.TYPE.STREAM_TYPE_MAIN|TRTC.TYPE.STREAM_TYPE_SUB} config.streamType - 远端流类型
1106
1103
  * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: 主流(远端用户的摄像头)(远端用户的摄像头)
@@ -1129,7 +1126,7 @@
1129
1126
  * - 该方法可多次调用。
1130
1127
  * - 该方法采用增量更新的方式,只需要传入需要更新的配置项即可。
1131
1128
  * @param {object} [config]
1132
- * @param {string | HTMLElement | null} [config.view] - 用于播放远端视频的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会拉流消耗带宽
1129
+ * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - 用于播放远端视频的 HTMLElement 实例或者 Id, 如果不传或传入null, 则不会渲染视频, 但会仍然会拉流消耗带宽
1133
1130
  * @param {string} config.userId - 远端用户Id
1134
1131
  * @param {TRTC.TYPE.STREAM_TYPE_MAIN|TRTC.TYPE.STREAM_TYPE_SUB} config.streamType - 远端流类型:
1135
1132
  * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: 主流(远端用户的摄像头)
@@ -1151,7 +1148,7 @@
1151
1148
  * await trtc.updateRemoteVideo(config);
1152
1149
  * @memberof TRTC
1153
1150
  */
1154
- updateRemoteVideo(config: UpdateRemoteVideoConfig): Promise<void>;
1151
+ updateRemoteVideo(config: RemoteVideoConfig): Promise<void>;
1155
1152
  /**
1156
1153
  * 用于停止远端视频播放。<br>
1157
1154
  * @param {object} config - 远端视频配置
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-sdk-v5",
3
- "version": "5.0.1",
3
+ "version": "5.1.0-beta.1",
4
4
  "description": "Tencent Cloud RTC SDK for Web",
5
5
  "main": "trtc.js",
6
6
  "module": "trtc.esm.js",