fix:调整开关静音时使用选择的清晰度作为期望数据发送

This commit is contained in:
liyi 2025-05-16 17:06:49 +08:00
parent 84ca900ddf
commit 7d4e257404

View File

@ -576,17 +576,25 @@ class TalkViewNativeDecodeLogic extends BaseGetXController {
///
void updateTalkExpect() {
// VideoTypeE的映射
final Map<String, VideoTypeE> qualityToVideoType = {
'标清': VideoTypeE.H264,
'高清': VideoTypeE.H264_720P,
//
};
TalkExpectReq talkExpectReq = TalkExpectReq();
state.isOpenVoice.value = !state.isOpenVoice.value;
// videoType
VideoTypeE currentVideoType = qualityToVideoType[state.currentQuality.value] ?? VideoTypeE.H264;
if (!state.isOpenVoice.value) {
talkExpectReq = TalkExpectReq(
videoType: [VideoTypeE.H264],
videoType: [currentVideoType],
audioType: [],
);
showToast('已静音'.tr);
} else {
talkExpectReq = TalkExpectReq(
videoType: [VideoTypeE.H264],
videoType: [currentVideoType],
audioType: [AudioTypeE.G711],
);
}