From 93a1770a5108932a0cafcdaf452656011f36bb4a Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Sat, 3 Jan 2026 00:03:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(call):=20=E4=BF=AE=E5=A4=8D=E9=80=9A?= =?UTF-8?q?=E8=AF=9D=E7=B1=BB=E5=9E=8B=E5=8F=82=E6=95=B0=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正了类型验证逻辑,将有效类型从 1/2 调整为 2/3 - 更新了通话类型映射,音频类型从 1 改为 2,视频类型从 2 改为 3 - 调整了 RTC 频道创建时的类型参数传递逻辑 --- lib/controller/message/call_controller.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/controller/message/call_controller.dart b/lib/controller/message/call_controller.dart index b1e1481..155aead 100644 --- a/lib/controller/message/call_controller.dart +++ b/lib/controller/message/call_controller.dart @@ -211,7 +211,7 @@ class CallController extends GetxController { } // 验证 type 参数 - if (type != 1 && type != 2) { + if (type != 2 && type != 3) { SmartDialog.showToast('类型参数错误:1为音频,2为视频'); return null; } @@ -270,7 +270,7 @@ class CallController extends GetxController { ); // 发起通话前,先创建一对一 RTC 频道 - final type = callType == CallType.video ? 2 : 1; // 1为音频,2为视频 + final type = callType == CallType.video ? 3 : 2; // 1为音频,2为视频 final channelData = await createOneOnOneRtcChannel(type: type); _callUid = channelData?.uid; _callChannelId = channelData?.channelId;