fix:调整开关静音时使用选择的清晰度作为期望数据发送
This commit is contained in:
parent
84ca900ddf
commit
7d4e257404
@ -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],
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user