Commit 1ebd2716 by qlintonger xeno

尝试对接声网有关操作以及音视频+1.1

parent 2579a50d
......@@ -331,7 +331,7 @@ pub async fn handle_agora_call(
"Refuse" => {
// 当前用户拒接电话之后,直接给当前用户发送CmdHangup消息
// 给toId用户发送CmdRefuse,表示对方拒接了电话
if let Some(current_user_data) = ONLINE_USERS.get(&from_id) {
if let Some(current_user_data) = ONLINE_USERS.get(from_id) {
let mut current_user_data_vec: Vec<&str> = current_user_data.split(',').collect();
let hangup_refuse_message = serde_json::json!({
"msgType": "CmdRefuse",
......@@ -400,7 +400,7 @@ pub async fn handle_agora_call(
// 主持人结束通话
"EndMeeting" => {
// 要求判断是否为主持人,只有主持人可以结束通话
if let Some(current_user_data) = ONLINE_USERS.get(&from_id) {
if let Some(current_user_data) = ONLINE_USERS.get(from_id) {
let mut current_user_data_vec: Vec<&str> = current_user_data.split(',').collect();
// 如果不是主持人,不允许发送该消息
if current_user_data_vec[6] != "1" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment