Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
aafeadd9
Commit
aafeadd9
authored
Oct 19, 2021
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加webrtc基础接口,逻辑待实现
parent
79edb4c7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
11 deletions
+21
-11
common/src/main/java/com/wecloud/im/controller/ImRtcController.java
+13
-3
common/src/main/java/com/wecloud/rtc/service/RtcService.java
+4
-4
common/src/main/java/com/wecloud/rtc/service/impl/RtcServiceImpl.java
+4
-4
No files found.
common/src/main/java/com/wecloud/im/controller/ImRtcController.java
View file @
aafeadd9
...
...
@@ -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
.
create
AndCall
(
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
);
}
...
...
common/src/main/java/com/wecloud/rtc/service/RtcService.java
View file @
aafeadd9
...
...
@@ -11,9 +11,9 @@ public interface RtcService {
/**
* 创建一个频道
* 创建一个频道
,并向接收方发送系统推送
*/
CreateRtcChannelResult
create
(
CreateRtcChannelParam
createRtcChannelParam
)
throws
JsonProcessingException
;
CreateRtcChannelResult
create
AndCall
(
CreateRtcChannelParam
createRtcChannelParam
)
throws
JsonProcessingException
;
/**
* 加入频道
...
...
@@ -30,8 +30,8 @@ public interface RtcService {
*/
void
leave
();
void
sdpForw
o
rd
();
void
sdpForw
a
rd
();
void
candidateForw
o
rd
();
void
candidateForw
a
rd
();
}
common/src/main/java/com/wecloud/rtc/service/impl/RtcServiceImpl.java
View file @
aafeadd9
...
...
@@ -29,7 +29,7 @@ public class RtcServiceImpl implements RtcService {
private
ImClientService
imClientService
;
@Override
public
CreateRtcChannelResult
create
(
CreateRtcChannelParam
createRtcChannelParam
)
throws
JsonProcessingException
{
public
CreateRtcChannelResult
create
AndCall
(
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
sdpForw
o
rd
()
{
public
void
sdpForw
a
rd
()
{
}
@Override
public
void
candidateForw
o
rd
()
{
public
void
candidateForw
a
rd
()
{
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment