Browse Source

fix(call): 修复通话类型参数映射错误

- 修正了类型验证逻辑,将有效类型从 1/2 调整为 2/3
- 更新了通话类型映射,音频类型从 1 改为 2,视频类型从 2 改为 3
- 调整了 RTC 频道创建时的类型参数传递逻辑
master
Jolie 2 months ago
parent
commit
93a1770a51
1 changed files with 2 additions and 2 deletions
  1. 4
      lib/controller/message/call_controller.dart

4
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; // 12
final type = callType == CallType.video ? 3 : 2; // 12
final channelData = await createOneOnOneRtcChannel(type: type);
_callUid = channelData?.uid;
_callChannelId = channelData?.channelId;

Loading…
Cancel
Save