房间id生成修改

This commit is contained in:
2026-05-17 20:59:34 +08:00
parent 457e59a4d0
commit 7ff53c2cfd
3 changed files with 18 additions and 6 deletions

View File

@@ -5,14 +5,13 @@
*/
import store from './store.js';
import UIRenderer from './renderer.js';
import { showNotification } from './utils.js';
import { showNotification, randomMeetingId } from './utils.js';
import chatMessage from './chatmessage.js';
import {
bindConnectViewEvents,
initWebSocket,
loadUserSettings
} from './connectview.js';
// 全局变量
let connectionId = "";
// 当前视图状态:'connect' 或 'call'(可用于未来扩展)
@@ -68,7 +67,9 @@ async function handleJoinCall(connectionId) {
*/
async function handleCreateCall() {
showNotification('正在创建通话...');
const connectionId = 'conn_' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
//const connectionId = 'conn_' + Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
const connectionId = randomMeetingId();
localStorage.setItem('connectionId', connectionId);
await switchToCallView(connectionId);
}