trtc-sdk-v5 5.0.2 → 5.0.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/index.d.ts +16 -3
- package/package.json +1 -1
- package/trtc.esm.js +31 -32
- package/trtc.js +1 -1
package/index.d.ts
CHANGED
|
@@ -309,7 +309,12 @@
|
|
|
309
309
|
*/
|
|
310
310
|
readonly AUTOPLAY_FAILED: "autoplay-failed";
|
|
311
311
|
/**
|
|
312
|
-
*
|
|
312
|
+
* 被踢出房间,原因如下:<br/>
|
|
313
|
+
* - kick: 相同 userId 的用户同时进入同一个房间(以下简称为同名进房),先进入房间的用户会被后进入的用户踢出房间。<br>
|
|
314
|
+
* - 同名进房是不允许的行为,可能会导致双方音视频通话异常,业务侧应避免出现这种情况。
|
|
315
|
+
* - TRTC 后台不保证观众角色同名进房互踢。即观众角色的用户,使用同 userId 进同一个房间,可能不会收到该事件。
|
|
316
|
+
* - banned: 系统管理员通过{@link https://cloud.tencent.com/document/product/647/40496 服务端 API} 将该用户踢出房间。
|
|
317
|
+
* - room-disband: 系统管理员通过{@link https://cloud.tencent.com/document/product/647/40496 服务端 API} 解散房间。
|
|
313
318
|
* @default 'kicked-out'
|
|
314
319
|
* @memberof module:EVENT
|
|
315
320
|
* @example
|
|
@@ -680,7 +685,12 @@
|
|
|
680
685
|
userId: string;
|
|
681
686
|
}];
|
|
682
687
|
}
|
|
683
|
-
|
|
688
|
+
|
|
689
|
+
interface TRTCOptions {
|
|
690
|
+
plugins?: Array<{
|
|
691
|
+
new (core: Core): IPlugin;
|
|
692
|
+
}>;
|
|
693
|
+
} class TRTC extends EventEmitter<TRTCEventTypes> {
|
|
684
694
|
/**
|
|
685
695
|
* 创建一个 TRTC 对象,用于实现进房、预览、推流、拉流等功能。<br>
|
|
686
696
|
*
|
|
@@ -692,7 +702,7 @@
|
|
|
692
702
|
*
|
|
693
703
|
* @returns {TRTC} trtc对象
|
|
694
704
|
*/
|
|
695
|
-
static create(): TRTC;
|
|
705
|
+
static create(options?: TRTCOptions): TRTC;
|
|
696
706
|
/**
|
|
697
707
|
* @typedef TurnServer
|
|
698
708
|
* @property {string} url TURN 服务器 url
|
|
@@ -1103,6 +1113,9 @@
|
|
|
1103
1113
|
* await trtc.stopScreenShare();
|
|
1104
1114
|
* */
|
|
1105
1115
|
stopScreenShare(): Promise<void>;
|
|
1116
|
+
startPlugin(plugin: PLUGIN_NAME, options: any): Promise<void>;
|
|
1117
|
+
updatePlugin(plugin: PLUGIN_NAME, options: any): Promise<void>;
|
|
1118
|
+
stopPlugin(plugin: PLUGIN_NAME, options: any): Promise<void>;
|
|
1106
1119
|
/**
|
|
1107
1120
|
* 播放远端视频
|
|
1108
1121
|
*
|