声音优化--视频对讲和监控
This commit is contained in:
parent
aae65dbfad
commit
f19f8f72ec
@ -927,7 +927,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
// 重置丢包率监控
|
||||
// PacketLossStatistics().reset();
|
||||
// 发送监控id - 监控模式不设置等待接听状态
|
||||
StartChartManage().startCallRequestMessageTimer(ToPeerId: network!.peerId ?? '', isMonitoring: true);
|
||||
StartChartManage().startCallRequestMessageTimer(ToPeerId: network!.peerId ?? '');
|
||||
} else {
|
||||
showToast('猫眼设置为省电模式时无法进行监控,请在猫眼设置中切换为其他模式'.tr);
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
|
||||
talkStatus.setAnsweredSuccessfully();
|
||||
// 主动呼叫时需要启动ping
|
||||
startChartManage.startTalkPingMessageTimer();
|
||||
} else if (talkStatus.status != TalkStatus.answeredSuccessfully) {
|
||||
} else if (talkStatus.status != TalkStatus.answeredSuccessfully && !startChartManage.isMonitoring) {
|
||||
playRingtone();
|
||||
}
|
||||
AppLog.log(
|
||||
|
||||
@ -98,6 +98,10 @@ class ScpMessageBaseHandle {
|
||||
|
||||
// 播放铃声
|
||||
void playRingtone() async {
|
||||
// 监控模式下不播放铃声
|
||||
if (startChartManage.isMonitoring) {
|
||||
return;
|
||||
}
|
||||
//test:使用自定义铃声
|
||||
await audioManager.playRingtone();
|
||||
}
|
||||
|
||||
@ -94,6 +94,7 @@ class StartChartManage {
|
||||
final String echoPeerId = '3phX8Ng2cZHz5NtP8xAf6nYy2z1BYytoejgjoHrWMGhH';
|
||||
|
||||
bool isOnlineStarChartServer = false; // 星图是否上线成功
|
||||
bool isMonitoring = false; // 是否处于监控模式
|
||||
Timer? reStartOnlineStartChartServerTimer; // 重新上线定时器
|
||||
Timer? talkPingTimer; // 发送通话保持消息定时器
|
||||
Timer? talkExpectTimer; // 发送通话预期消息定时器
|
||||
@ -437,6 +438,7 @@ class StartChartManage {
|
||||
// 更新全局ToPeerId为当前要连接的锁的peerId
|
||||
this.ToPeerId = ToPeerId;
|
||||
this.lockPeerId = ToPeerId;
|
||||
this.isMonitoring = isMonitoring;
|
||||
// 如果已经处于等待接听状态就不发送
|
||||
// if (talkStatus.status != TalkStatus.proactivelyCallWaitingAnswer) {
|
||||
// // 如果是h264则跳转至webview
|
||||
@ -492,6 +494,8 @@ class StartChartManage {
|
||||
void stopCallRequestMessageTimer() async {
|
||||
talkRequestTimer?.cancel();
|
||||
talkRequestTimer = null;
|
||||
// 重置监控模式状态
|
||||
isMonitoring = false;
|
||||
}
|
||||
|
||||
// 发送对讲请求消息
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user