Commit aafeadd9 by giaogiao

增加webrtc基础接口,逻辑待实现

parent 79edb4c7
......@@ -35,36 +35,46 @@ public class ImRtcController extends BaseController {
@PostMapping("/createAndCall")
@ApiOperation(value = "创建频道,并邀请客户端加入", notes = "创建频道,并邀请客户端加入")
public ApiResult<CreateRtcChannelResult> createAndCall(@RequestBody CreateRtcChannelParam createRtcChannelParam) throws Exception {
CreateRtcChannelResult createRtcChannelResult = rtcService.create(createRtcChannelParam);
CreateRtcChannelResult createRtcChannelResult = rtcService.createAndCall(createRtcChannelParam);
return ApiResult.ok(createRtcChannelResult);
}
@PostMapping("/join")
@ApiOperation(value = "同意进入频道", notes = "")
public ApiResult<Boolean> join() {
return ApiResult.result(true);
}
@PostMapping("/reject")
@ApiOperation(value = "拒接进入频道", notes = "")
public ApiResult<Boolean> reject() {
return ApiResult.result(true);
}
@PostMapping("/leave")
@ApiOperation(value = "主动挂断(离开频道)", notes = "")
public ApiResult<Boolean> leave() {
return ApiResult.result(true);
}
public ApiResult<Boolean> sdpForword() {
@PostMapping("/sdpForward")
@ApiOperation(value = "SDP数据转发", notes = "")
public ApiResult<Boolean> sdpForward() {
return ApiResult.result(true);
}
public ApiResult<Boolean> candidateForword() {
@PostMapping("/candidateForward")
@ApiOperation(value = "candidate候选者数据转发", notes = "")
public ApiResult<Boolean> candidateForward() {
return ApiResult.result(true);
}
......
......@@ -11,9 +11,9 @@ public interface RtcService {
/**
* 创建一个频道
* 创建一个频道,并向接收方发送系统推送
*/
CreateRtcChannelResult create(CreateRtcChannelParam createRtcChannelParam) throws JsonProcessingException;
CreateRtcChannelResult createAndCall(CreateRtcChannelParam createRtcChannelParam) throws JsonProcessingException;
/**
* 加入频道
......@@ -30,8 +30,8 @@ public interface RtcService {
*/
void leave();
void sdpForword();
void sdpForward();
void candidateForword();
void candidateForward();
}
......@@ -29,7 +29,7 @@ public class RtcServiceImpl implements RtcService {
private ImClientService imClientService;
@Override
public CreateRtcChannelResult create(CreateRtcChannelParam createRtcChannelParam) throws JsonProcessingException {
public CreateRtcChannelResult createAndCall(CreateRtcChannelParam createRtcChannelParam) throws JsonProcessingException {
ImClient client = imClientService.getCurentClient();
Long rtcChannelId = SnowflakeUtil.getId();
......@@ -42,7 +42,7 @@ public class RtcServiceImpl implements RtcService {
createRtcChannelResult.setChannelId(rtcChannelId);
// 对方发送邀请
// 对方发送邀请
return createRtcChannelResult;
......@@ -66,12 +66,12 @@ public class RtcServiceImpl implements RtcService {
}
@Override
public void sdpForword() {
public void sdpForward() {
}
@Override
public void candidateForword() {
public void candidateForward() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment