Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-communication
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
xingmin
yd-communication
Commits
f3c08a10
Commit
f3c08a10
authored
Aug 04, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
9bf17c88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
yd-communication-api/src/main/java/com/yd/communication/api/websocket/CoWebSocketServer.java
+10
-2
No files found.
yd-communication-api/src/main/java/com/yd/communication/api/websocket/CoWebSocketServer.java
View file @
f3c08a10
...
...
@@ -713,8 +713,16 @@ public class CoWebSocketServer {
// --- 操作5:WebRTC 信令转发(Offer/Answer/ICE) ---
if
(
"webrtc_offer"
.
equals
(
action
)
||
"webrtc_answer"
.
equals
(
action
)
||
"webrtc_ice_candidate"
.
equals
(
action
))
{
log
.
info
(
"【WebRTC信令】转发 {} 消息"
,
action
);
// 只转发给房间内除发送者外的所有人(包括发送者自己?通常不需要给自己)
log
.
info
(
"【WebRTC信令】转发 {} 消息, roomId={}, 发送者={}"
,
action
,
roomId
,
userId
);
// 打印信令内容摘要
if
(
"webrtc_offer"
.
equals
(
action
)
||
"webrtc_answer"
.
equals
(
action
))
{
String
sdpType
=
json
.
has
(
"sdp"
)
?
json
.
get
(
"sdp"
).
get
(
"type"
).
asText
()
:
"unknown"
;
log
.
info
(
"【WebRTC信令】SDP类型: {}"
,
sdpType
);
}
else
{
String
candidate
=
json
.
has
(
"candidate"
)
?
json
.
get
(
"candidate"
).
get
(
"candidate"
).
asText
()
:
"unknown"
;
log
.
info
(
"【WebRTC信令】ICE候选: {}"
,
candidate
);
}
// 广播给房间内其他人(不包含发送者)
broadcast
(
roomId
,
message
,
session
);
return
;
}
...
...
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