房间id生成修改
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* 处理初始连接、创建通话和加入通话的功能
|
||||
*/
|
||||
|
||||
import { showNotification } from '../utils.js';
|
||||
import { showNotification, randomMeetingId } from '../utils.js';
|
||||
|
||||
const MAX_AVATAR_SIZE = 2 * 1024 * 1024; // 2MB
|
||||
|
||||
@@ -28,8 +28,10 @@ function createCall() {
|
||||
showNotification('正在创建通话...');
|
||||
|
||||
// 生成随机连接ID
|
||||
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();
|
||||
showNotification(`已创建通话 (${connectionId})`);
|
||||
|
||||
// 保存连接ID到本地存储
|
||||
localStorage.setItem('connectionId', connectionId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user