mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
feat: 添加弹幕窗口管理功能;优化弹幕客户端连接逻辑;实现自动滚动和设置更新; 修复浏览页页面切换的问题
This commit is contained in:
@@ -102,7 +102,7 @@ export default abstract class BaseDanmakuClient {
|
||||
const result = await this.initClient();
|
||||
if (result.success) {
|
||||
this.state = 'connected';
|
||||
console.log(`[${this.type}] 弹幕客户端启动成功`);
|
||||
console.log(`[${this.type}] 弹幕客户端已完成启动`);
|
||||
} else {
|
||||
this.state = 'disconnected';
|
||||
console.error(`[${this.type}] 弹幕客户端启动失败: ${result.message}`);
|
||||
|
||||
@@ -34,7 +34,7 @@ export default class DirectClient extends BaseDanmakuClient {
|
||||
});
|
||||
|
||||
chatClient.on('live', () => {
|
||||
console.log('[DIRECT] 已连接房间: ' + this.authInfo.roomId);
|
||||
console.log('[direct] 已连接房间: ' + this.authInfo.roomId);
|
||||
});
|
||||
chatClient.on('DANMU_MSG', (data) => this.onDanmaku(data));
|
||||
chatClient.on('SEND_GIFT', (data) => this.onGift(data));
|
||||
@@ -45,7 +45,7 @@ export default class DirectClient extends BaseDanmakuClient {
|
||||
|
||||
return await super.initClientInner(chatClient);
|
||||
} else {
|
||||
console.log('[DIRECT] 无法开启场次, 未提供弹幕客户端认证信息');
|
||||
console.log('[direct] 无法开启场次, 未提供弹幕客户端认证信息');
|
||||
return {
|
||||
success: false,
|
||||
message: '未提供弹幕客户端认证信息'
|
||||
|
||||
Reference in New Issue
Block a user