floating-live 0.14.8 → 0.14.10
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/package.json
CHANGED
package/plugin/bilibili/index.js
CHANGED
|
@@ -33,6 +33,8 @@ export declare abstract class LiveRoom extends EventEmitter implements RoomInfo
|
|
|
33
33
|
abstract close(): void;
|
|
34
34
|
/** 从服务器获取信息 */
|
|
35
35
|
abstract getInfo(): Promise<void>;
|
|
36
|
+
/** 设置用户凭据 */
|
|
37
|
+
setAuth?(auth: string): void;
|
|
36
38
|
/** 销毁事件 */
|
|
37
39
|
protected onDestory?(): void;
|
|
38
40
|
/** 销毁 */
|
package/src/module/ModRoom.js
CHANGED
|
@@ -38,6 +38,11 @@ class ModRoom {
|
|
|
38
38
|
/** 设置登录凭据 */
|
|
39
39
|
setAuth(platform, auth) {
|
|
40
40
|
this.auths.set(platform, auth);
|
|
41
|
+
this.roomMap.forEach((room) => {
|
|
42
|
+
if (room.platform == platform) {
|
|
43
|
+
room.setAuth?.(auth);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
41
46
|
}
|
|
42
47
|
/** 设置房间配置 */
|
|
43
48
|
setConfig(platform, config) {
|