添加语音对讲接口
parent
e83e880991
commit
0382d300b6
|
@ -1141,15 +1141,15 @@ public class PlayServiceImpl implements IPlayService {
|
||||||
AudioBroadcastCatch audioBroadcastCatch = new AudioBroadcastCatch(device.getDeviceId(), channelId, mediaServerItem, app, stream, event, AudioBroadcastCatchStatus.Ready, isFromPlatform);
|
AudioBroadcastCatch audioBroadcastCatch = new AudioBroadcastCatch(device.getDeviceId(), channelId, mediaServerItem, app, stream, event, AudioBroadcastCatchStatus.Ready, isFromPlatform);
|
||||||
audioBroadcastManager.update(audioBroadcastCatch);
|
audioBroadcastManager.update(audioBroadcastCatch);
|
||||||
// 等待invite消息, 超时则结束
|
// 等待invite消息, 超时则结束
|
||||||
String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId();
|
// String key = VideoManagerConstants.BROADCAST_WAITE_INVITE + device.getDeviceId();
|
||||||
if (!SipUtils.isFrontEnd(device.getDeviceId())) {
|
// if (!SipUtils.isFrontEnd(device.getDeviceId())) {
|
||||||
key += audioBroadcastCatch.getChannelId();
|
// key += audioBroadcastCatch.getChannelId();
|
||||||
}
|
// }
|
||||||
dynamicTask.startDelay(key, ()->{
|
// dynamicTask.startDelay(key, ()->{
|
||||||
logger.info("[语音广播]等待invite消息超时:{}/{}", device.getDeviceId(), channelId);
|
// logger.info("[语音广播]等待invite消息超时:{}/{}", device.getDeviceId(), channelId);
|
||||||
event.call(-1,"等待invite消息超时");
|
// event.call(-1,"等待invite消息超时");
|
||||||
stopAudioBroadcast(device.getDeviceId(), channelId);
|
// stopAudioBroadcast(device.getDeviceId(), channelId);
|
||||||
}, 10*1000);
|
// }, 10*1000);
|
||||||
}, eventResultForError -> {
|
}, eventResultForError -> {
|
||||||
// 发送失败
|
// 发送失败
|
||||||
logger.error("语音广播发送失败: {}:{}", channelId, eventResultForError.msg);
|
logger.error("语音广播发送失败: {}:{}", channelId, eventResultForError.msg);
|
||||||
|
|
|
@ -281,7 +281,7 @@ public class PlayController {
|
||||||
playService.stopAudioBroadcast();
|
playService.stopAudioBroadcast();
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
playService.audioBroadcastCmd(device, channelId, mediaServerItem, app, stream, 60, false, (code, msg) -> {
|
playService.audioBroadcastCmd(device, channel, mediaServerItem, app, stream, 60, false, (code, msg) -> {
|
||||||
WVPResult<Void> wvpResult = new WVPResult<>();
|
WVPResult<Void> wvpResult = new WVPResult<>();
|
||||||
wvpResult.setCode(code);
|
wvpResult.setCode(code);
|
||||||
wvpResult.setMsg(msg);
|
wvpResult.setMsg(msg);
|
||||||
|
|
Loading…
Reference in New Issue