音视频
This commit is contained in:
@@ -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 {
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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> {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.lld.im.service.call.service;
|
||||
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ImCallHistoryService {
|
||||
}
|
||||
@@ -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")){
|
||||
|
||||
@@ -21,5 +21,8 @@ public class ImRoomEntity {
|
||||
private String webrtcUrl;
|
||||
private String rtmpUrl;
|
||||
private String type;
|
||||
|
||||
// publish 开始推流 hangup 结束推流
|
||||
private String cmd;
|
||||
private Integer offline;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user