客户端播放音乐时,多次推送给客户端

This commit is contained in:
wulin 2023-10-28 22:24:41 +08:00
parent 9d8bc48c35
commit 18647a3951
2 changed files with 4 additions and 1 deletions

View File

@ -76,6 +76,7 @@ public class MusicActionCommand extends ActionCommand implements IActionCommand
log.info("推送Box播放音乐");
BoxSession boxSession = baseWebSocketService.getBoxSessionWithSn(baseSession.getSn());
if(boxSession != null){
baseWebSocketService.sendMsg(boxSession, resp);
//记录音乐状态
if(resp.getMusic().getPlay().equals(PlayEnum.STOP.getCode())){
//去掉内存中音乐同步对象

View File

@ -303,8 +303,10 @@ public class BaseWebSocketService {
}
return;
}
}else{
sendMsg(baseSession, JSONObject.toJSONString(baseMessageResp));
}
sendMsg(baseSession, JSONObject.toJSONString(baseMessageResp));
}
/**