quickvo-sdk-js 0.1.9 → 0.2.0
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 +2 -2
- package/dist/enums/notifyName.d.ts +3 -3
- package/dist/index.js +8 -7
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -294,10 +294,10 @@ quickvo.setLocalStream('microphoneCamera_audio', true).then((streams) => {
|
|
|
294
294
|
/**
|
|
295
295
|
* 加入房间
|
|
296
296
|
* @param roomOptions RoomOptions
|
|
297
|
-
* @example quickvo.joinRoom({ userId: '', roomId: '', sdkToken: '', callType: '1' })
|
|
297
|
+
* @example quickvo.joinRoom({ userId: '', roomId: '', sdkToken: '', callType: '1', newPublishAutoSubscribe: true })
|
|
298
298
|
* @returns Promise<boolean>
|
|
299
299
|
*/
|
|
300
|
-
const options: RoomOptions = { userId: '', roomId: '', sdkToken: '', callType: '1' }
|
|
300
|
+
const options: RoomOptions = { userId: '', roomId: '', sdkToken: '', callType: '1', newPublishAutoSubscribe: true }
|
|
301
301
|
quickvo.joinRoom(options)
|
|
302
302
|
```
|
|
303
303
|
|
|
@@ -15,8 +15,8 @@ export declare const enum_notifyName: {
|
|
|
15
15
|
readonly onUpdatePermissions: "更新推流权限通知";
|
|
16
16
|
readonly onTokenExpired: "Token已过期";
|
|
17
17
|
readonly onDestroyRoom: "直播模式房间销毁";
|
|
18
|
-
readonly destroyRoom: "
|
|
19
|
-
readonly onDestroy: "销毁";
|
|
18
|
+
readonly destroyRoom: "服务器要求销毁房间";
|
|
19
|
+
readonly onDestroy: "SDK销毁";
|
|
20
20
|
};
|
|
21
21
|
export type T_notifyName = typeof enum_notifyName;
|
|
22
22
|
export type K_notifyName = keyof T_notifyName;
|
|
@@ -26,4 +26,4 @@ export declare const notifyName_options: {
|
|
|
26
26
|
label: any;
|
|
27
27
|
}[];
|
|
28
28
|
export declare const notifyName_keys: (keyof typeof enum_notifyName)[];
|
|
29
|
-
export declare const notifyName_vals: ("关闭轨道" | "网络情况变更" | "房间网络情况变更" | "心跳检测" | "网络质量回调" | "登录回调" | "更新本地媒体流" | "房间用户变化" | "房间状态变化" | "加入房间回调" | "退出房间回调" | "监听到流发布" | "更新通讯状态" | "更新推流权限通知" | "Token已过期" | "直播模式房间销毁" | "
|
|
29
|
+
export declare const notifyName_vals: ("关闭轨道" | "网络情况变更" | "房间网络情况变更" | "心跳检测" | "网络质量回调" | "登录回调" | "更新本地媒体流" | "房间用户变化" | "房间状态变化" | "加入房间回调" | "退出房间回调" | "监听到流发布" | "更新通讯状态" | "更新推流权限通知" | "Token已过期" | "直播模式房间销毁" | "服务器要求销毁房间" | "SDK销毁")[];
|
package/dist/index.js
CHANGED
|
@@ -3850,8 +3850,8 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
3850
3850
|
onUpdatePermissions: "更新推流权限通知",
|
|
3851
3851
|
onTokenExpired: "Token已过期",
|
|
3852
3852
|
onDestroyRoom: "直播模式房间销毁",
|
|
3853
|
-
destroyRoom: "
|
|
3854
|
-
onDestroy: "销毁"
|
|
3853
|
+
destroyRoom: "服务器要求销毁房间",
|
|
3854
|
+
onDestroy: "SDK销毁"
|
|
3855
3855
|
};
|
|
3856
3856
|
ut(enum_notifyName);
|
|
3857
3857
|
const notifyName_keys = Object.keys(enum_notifyName);
|
|
@@ -7603,12 +7603,13 @@ class RoomCalls extends RoomPeer {
|
|
|
7603
7603
|
* @returns Promise<boolean>
|
|
7604
7604
|
*/
|
|
7605
7605
|
W(this, "quitRoom", async () => new Promise(async ($) => {
|
|
7606
|
-
const { roomId: M, userId: R } = this.options, N = { roomId: M, user: { id: R } };
|
|
7607
7606
|
try {
|
|
7608
|
-
this.stopPublish()
|
|
7609
|
-
} catch {
|
|
7607
|
+
this.stopPublish();
|
|
7608
|
+
} catch (e) {
|
|
7609
|
+
console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->Breathe: error", e);
|
|
7610
7610
|
}
|
|
7611
|
-
this.
|
|
7611
|
+
const { roomId: M, userId: R } = this.options, N = { roomId: M, user: { id: R } };
|
|
7612
|
+
await this.cwsIns.sendMessage({ event: "quitRoom", data: N }), this.cwsIns.emitNotify("onDestroy", { code: 200, data: {} }), $(!0);
|
|
7612
7613
|
}));
|
|
7613
7614
|
/**
|
|
7614
7615
|
* 同步房间信息
|
|
@@ -8007,7 +8008,7 @@ class QuickVO extends Room {
|
|
|
8007
8008
|
};
|
|
8008
8009
|
this.cwsIns.addNotify({ event: "onUpdatePermissions", callback: $ }, !0);
|
|
8009
8010
|
}
|
|
8010
|
-
this.cwsIns.addNotify({ event: "onTokenExpired", callback: async ($) => this.destroy() }, !0), this.cwsIns.addNotify({ event: "
|
|
8011
|
+
this.cwsIns.addNotify({ event: "onTokenExpired", callback: async ($) => this.destroy() }, !0), this.cwsIns.addNotify({ event: "destroyRoom", callback: this.destroy }, !0), this.cwsIns.addNotify({ event: "onDestroy", callback: this.destroy }, !0);
|
|
8011
8012
|
});
|
|
8012
8013
|
/**
|
|
8013
8014
|
* 重连成功
|