trtc-sdk-v5 5.0.0-beta

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.
@@ -0,0 +1,90 @@
1
+ <p align="center">
2
+ <a href="https://cloud.tencent.com/document/product/647">
3
+ <img width="200" src="https://web.sdk.qcloud.com/trtc/webrtc/assets/trtc-logo.png">
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">TRTC Web SDK</h1>
8
+
9
+ <div align="center">
10
+
11
+ 一款面向对象的 WebRTC SDK。
12
+
13
+ [![NPM version](https://img.shields.io/npm/v/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![NPM downloads](https://img.shields.io/npm/dw/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![trtc.js](https://img.shields.io/bundlephobia/min/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![Typescript Supported](https://img.shields.io/badge/Typescript-Supported-blue)](https://www.npmjs.com/package/trtc-sdk-v5) [![Documents](https://img.shields.io/badge/-Documents-blue)](https://web.sdk.qcloud.com/trtc/webrtc/doc/en/index.html) [![Stars](https://img.shields.io/github/stars/tencentyun/TRTCSDK?style=social)](https://github.com/LiteAVSDK/TRTC_Web)
14
+
15
+ </div>
16
+
17
+ 简体中文 | [English](./README.md)
18
+ ## 简介
19
+
20
+ [TRTC Web SDK](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/index.html) 是腾讯云实时音视频通讯解决方案的 Web 端 SDK,它是通过 HTML 网页加载的 JavaScript 库。Web 开发者可以使用 TRTC Web SDK 提供的 API,在您的业务网站上实现实时音视频通话、直播等功能。
21
+
22
+ - [在线 Demo](https://trtc.tencentcloud.com/demo/homepage/#/home)
23
+
24
+ ## 环境支持
25
+
26
+ TRTC Web SDK 支持市面上主流浏览器,详情参考:[浏览器支持情况](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-05-info-browser.html)。
27
+
28
+ | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> Edge | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>iOS Safari | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Opera |
29
+ | --------- | --------- | --------- | --------- | --------- | --------- |
30
+ | 56+ | 80+ | 56+ | 11+ | 11+ | 46+ |
31
+
32
+ ## 安装
33
+
34
+ 使用 npm:
35
+ ```
36
+ $ npm install trtc-sdk-v5 --save
37
+ ```
38
+
39
+ 使用 yarn:
40
+ ```
41
+ $ yarn add trtc-sdk-v5
42
+ ```
43
+
44
+ 手动下载 sdk 包:
45
+
46
+ 1. 下载 [trtc.js](https://www.unpkg.com/trtc-sdk-v5@latest/trtc.js)
47
+ 2. 将 `trtc.js` 复制到您的项目中。
48
+
49
+ ## 使用
50
+
51
+ 通过 import 引入或者 script 引入
52
+
53
+ ```js
54
+ import TRTC from 'trtc-sdk-v5';
55
+ // or
56
+ <script src="trtc.js"></script>
57
+ ```
58
+
59
+ 参考下述两个教程,可快速跑通 Demo 及了解如何使用 SDK 实现基础音视频通话功能。
60
+
61
+ - [快速跑通 Demo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-10-basic-get-started-with-demo.html)
62
+ - [基础音视频通话](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-11-basic-video-call.html)
63
+
64
+ ## API 概要
65
+
66
+ - [TRTC](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html) 是整个 SDK 的主入口,提供创建 TRTC 对象 [TRTC](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html)、获取摄像头列表、麦克风列表、检查浏览器兼容性、控制日志等级及日志上传等功能。
67
+ - [TRTC](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html) TRTC对象,提供实时音视频通话的核心能力:
68
+ - 进房 [enterRoom](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#enterRoom)
69
+ - 退房 [exitRoom](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#exitRoom)
70
+ - 发布/预览本地视频 [startLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#startLocalVideo)
71
+ - 发布/预览本地音频 [startLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#startLocalAudio)
72
+ - 取消发布/预览本地视频 [stopLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#stopLocalVideo)
73
+ - 取消发布/预览本地音频 [stopLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#stopLocalAudio)
74
+ - 观看远端视频 [startRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#startRemoteVideo)
75
+ - 取消观看视频 [stopRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#stopRemoteVideo)
76
+ - 静音/取消静音远端音频 [muteRemoteAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#muteRemoteAudio)
77
+
78
+ ## 目录结构
79
+
80
+ ```
81
+ ├── README.md
82
+ ├── package.json
83
+ ├── trtc.js // npm 包入口文件(umd 格式)
84
+ ├── trtc.esm.js // 基于 es 模块的 sdk 包(esm 格式)
85
+ ├── index.d.ts // 类型声明文件
86
+ ```
87
+
88
+ ## Changelog
89
+
90
+ - [变更日志](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-01-info-changelog.html)
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ <p align="center">
2
+ <a href="https://intl.cloud.tencent.com/products/trtc">
3
+ <img width="200" src="https://web.sdk.qcloud.com/trtc/webrtc/assets/trtc-logo.png">
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">TRTC Web SDK</h1>
8
+
9
+ <div align="center">
10
+
11
+ An object-oriented WebRTC SDK library
12
+
13
+ [![NPM version](https://img.shields.io/npm/v/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![NPM downloads](https://img.shields.io/npm/dw/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![trtc.js](https://img.shields.io/bundlephobia/min/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![Typescript Supported](https://img.shields.io/badge/Typescript-Supported-blue)](https://www.npmjs.com/package/trtc-sdk-v5) [![Documents](https://img.shields.io/badge/-Documents-blue)](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/index.html) [![Stars](https://img.shields.io/github/stars/tencentyun/TRTCSDK?style=social)](https://github.com/LiteAVSDK/TRTC_Web)
14
+
15
+ </div>
16
+
17
+ English | [简体中文](https://github.com/LiteAVSDK/TRTC_Web/blob/main/SDK/README-zh_CN.md)
18
+
19
+ ## Introduction
20
+
21
+ TRTC Web SDK is an object-oriented WebRTC SDK of Tencent Cloud's real-time communication solution. Web developers can use TRTC Web SDK to establish an audio/video calls or live streaming services on your website.
22
+
23
+ - [Online Demo](https://trtc.tencentcloud.com/demo/homepage/#/home)
24
+
25
+ ## Environment Supports
26
+
27
+ TRTC Web SDK supports major modern browsers. For details, please refer to [Browsers Supported](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-05-info-browser.html).
28
+
29
+ | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> Edge | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>iOS Safari | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Opera |
30
+ | --------- | --------- | --------- | --------- | --------- | --------- |
31
+ | 56+ | 80+ | 56+ | 11+ | 11+ | 46+ |
32
+
33
+ ## Install
34
+
35
+ npm:
36
+ ```
37
+ $ npm install trtc-sdk-v5 --save
38
+ ```
39
+
40
+ yarn:
41
+ ```
42
+ $ yarn add trtc-sdk-v5
43
+ ```
44
+
45
+ Download manually:
46
+
47
+ 1. download [trtc.js](https://www.unpkg.com/trtc-sdk-v5@latest/trtc.js).
48
+ 2. copy `trtc.js` to your project.
49
+
50
+ ## Usage
51
+
52
+ Refer to the following two tutorials for a quick run-through of the demo and how to use the SDK to implement basic audio and video calling functionality.
53
+
54
+ - [Demo Quick Run](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-10-basic-get-started-with-demo.html)
55
+ - [Basic Audio/Video Call](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-11-basic-video-call.html)
56
+
57
+ Explore SDK documents:[TRTC Web SDK](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/index.html)
58
+
59
+ ## API Overview
60
+
61
+ - [TRTC](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html) is the main entry for TRTC SDK, providing APIs such as create trtc instance([TRTC.create](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#.create)), [TRTC.getCameraList](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#.getCameraList), [TRTC.getMicrophoneList](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#.getMicrophoneList), [TRTC.isSupported](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#.isSupported).
62
+ - [trtc](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html) instance, provides the core capability for real-time audio and video calls.
63
+ - Enter room [trtc.enterRoom](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#enterRoom)
64
+ - Exit room [trtc.exitRoom](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#exitRoom)
65
+ - Turn on camera [trtc.startLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#startLocalVideo)
66
+ - Turn on microphone [trtc.startLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#startLocalAudio)
67
+ - Turn off camera [trtc.stopLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopLocalVideo)
68
+ - Turn off microphone [trtc.stopLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopLocalAudio)
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)
71
+ - Mute/unmute remote audio [trtc.muteRemoteAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#muteRemoteAudio)
72
+
73
+ ## Directory
74
+
75
+ ```
76
+ ├── README.md
77
+ ├── package.json
78
+ ├── trtc.js // sdk file(umd format)
79
+ ├── trtc.esm.js // sdk file base on ES modules(esm format)
80
+ └── index.d.ts // ts declaration file
81
+ ```
82
+
83
+ ## Changelog
84
+
85
+ - [Changelog](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-01-info-changelog.html)
package/core.d.ts ADDED
@@ -0,0 +1,338 @@
1
+
2
+ declare enum LOG_LEVEL {
3
+ /**
4
+ * 输出所有日志
5
+ */
6
+ TRACE = 0,
7
+ /**
8
+ * 输出 DEBUG、INFO、WARN、ERROR 等级日志
9
+ */
10
+ DEBUG = 1,
11
+ /**
12
+ * 输出 INFO、WARN、ERROR 等级日志
13
+ */
14
+ INFO = 2,
15
+ /**
16
+ * 输出 WARN、ERROR 等级日志
17
+ */
18
+ WARN = 3,
19
+ /**
20
+ * 输出 ERROR 等级日志
21
+ */
22
+ ERROR = 4,
23
+ /**
24
+ * 不输出任何日志
25
+ */
26
+ NONE = 5
27
+ }
28
+ declare const audioProfileMap: {
29
+ readonly standard: {
30
+ readonly sampleRate: 48000;
31
+ readonly channelCount: 1;
32
+ readonly bitrate: 40;
33
+ };
34
+ readonly 'standard-stereo': {
35
+ readonly sampleRate: 48000;
36
+ readonly channelCount: 2;
37
+ readonly bitrate: 64;
38
+ };
39
+ readonly high: {
40
+ readonly sampleRate: 48000;
41
+ readonly channelCount: 1;
42
+ readonly bitrate: 192;
43
+ };
44
+ readonly 'high-stereo': {
45
+ readonly sampleRate: 48000;
46
+ readonly channelCount: 2;
47
+ readonly bitrate: 192;
48
+ };
49
+ };
50
+ declare const videoProfileMap: {
51
+ readonly '120p': {
52
+ readonly width: 160;
53
+ readonly height: 120;
54
+ readonly frameRate: 15;
55
+ readonly bitrate: 200;
56
+ };
57
+ readonly '180p': {
58
+ readonly width: 320;
59
+ readonly height: 180;
60
+ readonly frameRate: 15;
61
+ readonly bitrate: 350;
62
+ };
63
+ readonly '240p': {
64
+ readonly width: 320;
65
+ readonly height: 240;
66
+ readonly frameRate: 15;
67
+ readonly bitrate: 400;
68
+ };
69
+ readonly '360p': {
70
+ readonly width: 640;
71
+ readonly height: 360;
72
+ readonly frameRate: 15;
73
+ readonly bitrate: 800;
74
+ };
75
+ readonly '480p': {
76
+ readonly width: 640;
77
+ readonly height: 480;
78
+ readonly frameRate: 15;
79
+ readonly bitrate: 900;
80
+ };
81
+ readonly '720p': {
82
+ readonly width: 1280;
83
+ readonly height: 720;
84
+ readonly frameRate: 15;
85
+ readonly bitrate: 1500;
86
+ };
87
+ readonly '1080p': {
88
+ readonly width: 1920;
89
+ readonly height: 1080;
90
+ readonly frameRate: 15;
91
+ readonly bitrate: 2000;
92
+ };
93
+ readonly '1440p': {
94
+ readonly width: 2560;
95
+ readonly height: 1440;
96
+ readonly frameRate: 30;
97
+ readonly bitrate: 4860;
98
+ };
99
+ readonly '4K': {
100
+ readonly width: 3840;
101
+ readonly height: 2160;
102
+ readonly frameRate: 30;
103
+ readonly bitrate: 9000;
104
+ };
105
+ };
106
+ declare const screenProfileMap: {
107
+ readonly '480p': {
108
+ readonly width: 640;
109
+ readonly height: 480;
110
+ readonly frameRate: 5;
111
+ readonly bitrate: 900;
112
+ };
113
+ readonly '480p_2': {
114
+ readonly width: 640;
115
+ readonly height: 480;
116
+ readonly frameRate: 30;
117
+ readonly bitrate: 1000;
118
+ };
119
+ readonly '720p': {
120
+ readonly width: 1280;
121
+ readonly height: 720;
122
+ readonly frameRate: 5;
123
+ readonly bitrate: 1200;
124
+ };
125
+ readonly '720p_2': {
126
+ readonly width: 1280;
127
+ readonly height: 720;
128
+ readonly frameRate: 30;
129
+ readonly bitrate: 3000;
130
+ };
131
+ readonly '1080p': {
132
+ readonly width: 1920;
133
+ readonly height: 1080;
134
+ readonly frameRate: 5;
135
+ readonly bitrate: 1600;
136
+ };
137
+ readonly '1080p_2': {
138
+ readonly width: 1920;
139
+ readonly height: 1080;
140
+ readonly frameRate: 30;
141
+ readonly bitrate: 4000;
142
+ };
143
+ };
144
+ declare const enum Scene {
145
+ LIVE = "live",
146
+ RTC = "rtc"
147
+ }
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ declare interface DeviceInfo {
163
+ readonly deviceId: string;
164
+ readonly groupId: string;
165
+ readonly kind: MediaDeviceKind;
166
+ readonly label: string;
167
+ }
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+ declare interface MixTranscodeConfig {
209
+ /** Stream mixing mode */
210
+ mode?: 'manual' | 'preset-layout';
211
+ /** Stream ID after mixtranscoding. Default value: '' */
212
+ streamId?: string;
213
+ /**
214
+ * Width of the video resolution in px after transcoding. Default value: 640.
215
+ *
216
+ * The value must be greater than or equal to 0 and is large enough so that all mixed video streams can be accommodated.
217
+ */
218
+ videoWidth?: number;
219
+ /**
220
+ * Height of the video resolution in px after transcoding. Default value: 480.
221
+ *
222
+ * The value must be greater than or equal to 0 and is large enough so that all mixed video streams can be accommodated.
223
+ */
224
+ videoHeight?: number;
225
+ /** Video bitrate (Kbps) after transcoding. If `0` is passed in, the bitrate value is determined by `videoWidth` and `videoHeight`. */
226
+ videoBitrate?: number;
227
+ /** Video frame rate (fps) after transcoding. Default value: 15. Value range: (0, 30]. */
228
+ videoFramerate?: number;
229
+ /** Video keyframe interval (s) after transcoding. Default value: 2. Value range: [1, 8]. */
230
+ videoGOP?: number;
231
+ /** Audio sample rate (Hz) after transcoding. Default value: 48000 */
232
+ audioSampleRate?: number;
233
+ /** Audio bitrate (Kbps) after transcoding. Default value: 64. Value range: [32, 192]. */
234
+ audioBitrate?: number;
235
+ /** Number of sound channels after transcoding. Valid values: 1 (default), 2 */
236
+ audioChannels?: 1 | 2;
237
+ /** Background color of the image after mixing. The value must be a hexadecimal number. Default value: 0x000000 (black) */
238
+ backgroundColor?: number;
239
+ /** Background picture of the image after mixing. Default value: '' */
240
+ backgroundImage?: string;
241
+ /** Information list of users' streams mixed. The list must contain API caller information. */
242
+ mixUsers: MixUser[];
243
+ }
244
+ /**
245
+ * @link https://web.sdk.qcloud.com/trtc/webrtc/doc/en/global.html#MixUser
246
+ */
247
+ declare interface MixUser {
248
+ /** userId */
249
+ userId: string;
250
+ /**
251
+ * user's roomId. You can use this param to mix streams from diffrent rooms.
252
+ * @since 4.11.5
253
+ */
254
+ roomId: number | string;
255
+ /** Only the user's audio stream is mixed in. If the value is `true`, the following video parameters do not need to be passed in. */
256
+ pureAudio: boolean;
257
+ /** Width (px) of the user's stream in the mixed stream. The value must be greater than or equal to 0. The default value is 0. */
258
+ width?: number;
259
+ /** Height (px) of the user's stream in the mixed stream. The value must be greater than or equal to 0. The default value is 0. */
260
+ height?: number;
261
+ /** X coordinate (px) of the user's stream in the mixed stream, starting from the upper left corner of the mixed stream. The value must be greater than or equal to 0. The default value is 0. */
262
+ locationX?: number;
263
+ /** Y coordinate (px) of the user's stream in the mixed stream, starting from the upper left corner of the mixed stream. The value must be greater than or equal to 0. The default value is 0. */
264
+ locationY?: number;
265
+ /** Layer number of the user's stream in the mixed stream. The value range is [1, 15]. If `pureAudio` is `false`, `zOrder` must be passed in. */
266
+ zOrder?: number;
267
+ /** Remote stream type in manual mode. This parameter does not need to be set in preset layout mode. Valid values: `main` (primary stream), `auxiliary` (substream of screen sharing) */
268
+ streamType?: RemoteStreamType;
269
+ renderMode?: 0 | 1 | 2;
270
+ }
271
+
272
+ declare interface PublishCDNStreamOptions {
273
+ /** Custom stream ID. Default value: ${sdkAppId}_${roomId}_${userId}_main */
274
+ streamId?: string;
275
+ streamType?: RemoteStreamType;
276
+ /** Tencent Cloud live streaming `appId` */
277
+ appId?: number;
278
+ /** Tencent Cloud live streaming `bizId` */
279
+ bizId?: number;
280
+ /** Specified CDN address for stream publishing */
281
+ url?: string;
282
+ }
283
+
284
+ declare const enum PlayerState {
285
+ PAUSED = "PAUSED",
286
+ PLAYING = "PLAYING",
287
+ STOPPED = "STOPPED"
288
+ }
289
+ declare const enum UserRole {
290
+ ANCHOR = "anchor",
291
+ AUDIENCE = "audience"
292
+ }
293
+ declare const enum ConnectionState {
294
+ CONNECTED = "CONNECTED",
295
+ DISCONNECTED = "DISCONNECTED",
296
+ CONNECTING = "CONNECTING",
297
+ RECONNECTED = "RECONNECTED",
298
+ RECONNECTING = "RECONNECTING"
299
+ }
300
+ declare interface NetworkQuality {
301
+ uplinkNetworkQuality: NetworkQualityValue;
302
+ downlinkNetworkQuality: NetworkQualityValue;
303
+ uplinkRTT: number;
304
+ uplinkLoss: number;
305
+ downlinkRTT: number;
306
+ downlinkLoss: number;
307
+ downlinkInfo: {
308
+ rtt: number;
309
+ loss: number;
310
+ userId: string;
311
+ }[];
312
+ }
313
+ declare const enum BannedReason {
314
+ BANNED = "banned",
315
+ KICK = "kick",
316
+ USER_TIME_OUT = "user_time_out",
317
+ ROOM_DISBAND = "room_disband"
318
+ }
319
+ declare interface AudioSourceOptions {
320
+ id: string;
321
+ url: string;
322
+ loop?: boolean;
323
+ volume?: number;
324
+ operation?: string;
325
+ }
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+