房间id生成修改
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user