【m】增加未连接时的提示
This commit is contained in:
@@ -172,7 +172,9 @@ class CallStateManager {
|
||||
async setUp(connectionId) {
|
||||
//TODO
|
||||
this.connectionId = connectionId; // 获取连接ID
|
||||
|
||||
// 设置状态为连接中
|
||||
this.state.session.status = 'connecting';
|
||||
this.notify({ type: 'CALL_STATUS_CHANGE', status: 'connecting' });
|
||||
// 确保本地流已经初始化
|
||||
if (!this.state.localStream) {
|
||||
console.log('Local stream not available, waiting for initialization...');
|
||||
@@ -196,6 +198,10 @@ class CallStateManager {
|
||||
|
||||
// 连接建立回调
|
||||
this.renderstreaming.onConnect = () => {
|
||||
// 连接建立后,更新状态为ongoing
|
||||
this.state.session.status = 'ongoing';
|
||||
this.notify({ type: 'CALL_STATUS_CHANGE', status: 'ongoing' });
|
||||
|
||||
if (this.state.localStream) {
|
||||
const tracks = this.state.localStream.getTracks(); // 获取本地媒体轨道
|
||||
for (const track of tracks) {
|
||||
|
||||
Reference in New Issue
Block a user