refactor: description use sync.Map

This commit is contained in:
langhuihui
2024-10-08 20:32:12 +08:00
parent 9cb27f654e
commit f2f65478ad
29 changed files with 233 additions and 197 deletions

View File

@@ -186,7 +186,7 @@ func (conf *WebRTCPlugin) Play_(w http.ResponseWriter, r *http.Request) {
if videoSender == nil {
suber.SubVideo = false
}
conn.AddTask(m7s.CreatePlayTask(suber, func(frame *mrtp.Audio) (err error) {
go m7s.PlayBlock(suber, func(frame *mrtp.Audio) (err error) {
for _, p := range frame.Packets {
if err = audioTLSRTP.WriteRTP(p); err != nil {
return
@@ -200,7 +200,7 @@ func (conf *WebRTCPlugin) Play_(w http.ResponseWriter, r *http.Request) {
}
}
return nil
}))
})
}
conn.OnICECandidate(func(ice *ICECandidate) {
if ice != nil {