Refactor WebRTC candidates processing

This commit is contained in:
Alexey Khit
2023-02-24 11:28:14 +03:00
parent 3fb917f00f
commit 4328d2a573
4 changed files with 105 additions and 45 deletions

View File

@@ -58,7 +58,9 @@ func Init() {
return pionAPI.NewPeerConnection(pionConf)
}
candidates = cfg.Mod.Candidates
for _, candidate := range cfg.Mod.Candidates {
AddCandidate(candidate)
}
api.HandleWS("webrtc", asyncHandler)
api.HandleWS("webrtc/offer", asyncHandler)