mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Revert "ICE servers as URIs with auth."
This commit is contained in:
parent
fd07597262
commit
c8328a56c0
@ -3,7 +3,6 @@ package webrtc
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@ -424,35 +423,6 @@ func (manager *WebRTCManagerCtx) apiConfiguration() *webrtc.Configuration {
|
||||
}
|
||||
}
|
||||
|
||||
ICEServers := []webrtc.ICEServer{}
|
||||
for _, server := range manager.config.ICEServers {
|
||||
u, err := url.Parse(server)
|
||||
|
||||
// if it is not valid URL, just pass it down
|
||||
if err != nil {
|
||||
ICEServers = append(ICEServers, webrtc.ICEServer{
|
||||
URLs: []string{server},
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
||||
var pwdInt interface{}
|
||||
pwd, ok := u.User.Password()
|
||||
if ok {
|
||||
pwdInt = pwd
|
||||
} else {
|
||||
pwdInt = false
|
||||
}
|
||||
|
||||
ICEServers = append(ICEServers, webrtc.ICEServer{
|
||||
URLs: []string{
|
||||
u.Scheme + ":" + u.Host + u.Path + "?" + u.RawQuery,
|
||||
},
|
||||
Username: u.User.Username(),
|
||||
Credential: pwdInt,
|
||||
})
|
||||
}
|
||||
|
||||
return &webrtc.Configuration{
|
||||
ICEServers: []webrtc.ICEServer{
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user