音视频

This commit is contained in:
2023-11-22 19:23:20 +08:00
parent 9a57e4aaab
commit 5a5f97c357
22 changed files with 13599 additions and 513 deletions

View File

@@ -0,0 +1,13 @@
package com.lld.im.service.call.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("v1/im_call_history")
public class ImCallHistoryController {
}

View File

@@ -0,0 +1,32 @@
package com.lld.im.service.call.dao;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("im_call_history")
public class ImCallHistoryEntity {
private String id;
private String inviteId;
private String inviteName;
private String passiveId;
private String passiveName;
private String roomId;
// 通话唯一uuid
private String sessionId;
// 待开始,正在进行中,已结束
private String status;
private Date createTime;
private Date endTime;
// 持续时间(秒)
private Integer continueSecond;
}

View File

@@ -0,0 +1,10 @@
package com.lld.im.service.call.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lld.im.service.call.dao.ImCallHistoryEntity;
import org.springframework.stereotype.Repository;
@Repository
public interface ImCallHistoryMapper extends BaseMapper<ImCallHistoryEntity> {
}

View File

@@ -0,0 +1,8 @@
package com.lld.im.service.call.service;
import org.springframework.stereotype.Service;
@Service
public class ImCallHistoryService {
}

View File

@@ -72,7 +72,11 @@ public class RoomController {
try {
ImRoomEntity roomEntity = new ImRoomEntity();
roomEntity.setRoomId(callBackReq.getApp());
roomEntity.setPublishId(callBackReq.getStream());
String[] publishResults=callBackReq.getStream().split("unity");
roomEntity.setPublishId(publishResults[0]);
if(StringUtils.equals(callBackReq.getAction() ,"on_unpublish")){
roomService.deleteUserFromRoom(roomEntity);
}else if(StringUtils.equals(callBackReq.getAction() ,"on_publish")){

View File

@@ -21,5 +21,8 @@ public class ImRoomEntity {
private String webrtcUrl;
private String rtmpUrl;
private String type;
// publish 开始推流 hangup 结束推流
private String cmd;
private Integer offline;
}