[*] 优化媒体消费逻辑
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
<el-button type="primary" :disabled="!taoyao" @click="roomActive = 'enter';roomVisible = true;">选择房间</el-button>
|
||||
<el-button type="primary" :disabled="!taoyao" @click="roomActive = 'create';roomVisible = true;">创建房间</el-button>
|
||||
<el-button :disabled="!taoyao || !room.roomId">邀请终端</el-button>
|
||||
<el-button :disabled="!taoyao || !room.roomId">退出房间</el-button>
|
||||
<el-button :disabled="!taoyao || !room.roomId">离开房间</el-button>
|
||||
<el-button :disabled="!taoyao || !room.roomId" @click="roomClose()" type="danger">关闭房间</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -503,6 +503,9 @@ class Taoyao extends RemoteClient {
|
||||
case "room::enter":
|
||||
me.defaultRoomEnter(message);
|
||||
break;
|
||||
case "room::leave":
|
||||
me.defaultRoomLeave(message);
|
||||
break;
|
||||
case "platform::error":
|
||||
me.callbackError(message);
|
||||
break;
|
||||
@@ -780,6 +783,18 @@ class Taoyao extends RemoteClient {
|
||||
me.remoteClients.set(clientId, new RemoteClient(status));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 离开房间信令
|
||||
*
|
||||
* @param {*} message
|
||||
*/
|
||||
defaultRoomLeave(message) {
|
||||
const me = this;
|
||||
const { clientId } = message.body;
|
||||
me.remoteClients.delete(clientId);
|
||||
console.info("终端离开:", clientId);
|
||||
// TODO:资源释放
|
||||
}
|
||||
/**
|
||||
* 错误回调
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user