iceservers join with iceserver.
This commit is contained in:
parent
f85d4d312f
commit
83570a15ca
@ -40,6 +40,7 @@ For n.eko room management software visit https://github.com/m1k1o/neko-rooms.
|
|||||||
- Added simple language picker.
|
- Added simple language picker.
|
||||||
- Added `?usr=<display-name>` that will prefill username. This allows creating auto-join links.
|
- Added `?usr=<display-name>` that will prefill username. This allows creating auto-join links.
|
||||||
- Added `?cast=1` that will hide all control and show only video.
|
- Added `?cast=1` that will hide all control and show only video.
|
||||||
|
- Support for password protected `NEKO_ICESERVERS` (by @mbattista).
|
||||||
|
|
||||||
### Bugs
|
### Bugs
|
||||||
- Fixed minor gst pipeline bug.
|
- Fixed minor gst pipeline bug.
|
||||||
@ -282,7 +283,7 @@ NEKO_ICELITE:
|
|||||||
- Use the ice lite protocol
|
- Use the ice lite protocol
|
||||||
- e.g. false
|
- e.g. false
|
||||||
NEKO_ICESERVER:
|
NEKO_ICESERVER:
|
||||||
- Describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer (deprecated)
|
- Describes a single STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer (simple usage for server without authentication)
|
||||||
- e.g. 'stun:stun.l.google.com:19302'
|
- e.g. 'stun:stun.l.google.com:19302'
|
||||||
NEKO_ICESERVERS:
|
NEKO_ICESERVERS:
|
||||||
- Describes multiple STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer
|
- Describes multiple STUN and TURN server that can be used by the ICEAgent to establish a connection with a peer
|
||||||
|
@ -50,15 +50,22 @@ func (WebRTC) Init(cmd *cobra.Command) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *WebRTC) Set() {
|
func (s *WebRTC) Set() {
|
||||||
|
s.NAT1To1IPs = viper.GetStringSlice("nat1to1")
|
||||||
s.ICELite = viper.GetBool("icelite")
|
s.ICELite = viper.GetBool("icelite")
|
||||||
s.ICEServers = []webrtc.ICEServer{{URLs: viper.GetStringSlice("iceserver")}}
|
s.ICEServers = []webrtc.ICEServer{}
|
||||||
if viper.GetString("iceservers") != "" {
|
|
||||||
err := json.Unmarshal([]byte(viper.GetString("iceservers")), &s.ICEServers)
|
iceServersJson := viper.GetString("iceservers")
|
||||||
|
if iceServersJson != "" {
|
||||||
|
err := json.Unmarshal([]byte(iceServersJson), &s.ICEServers)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s.NAT1To1IPs = viper.GetStringSlice("nat1to1")
|
|
||||||
|
iceServerSlice := viper.GetStringSlice("iceserver")
|
||||||
|
if len(iceServerSlice) > 0 {
|
||||||
|
s.ICEServers = append(s.ICEServers, webrtc.ICEServer{URLs: iceServerSlice})
|
||||||
|
}
|
||||||
|
|
||||||
if len(s.NAT1To1IPs) == 0 {
|
if len(s.NAT1To1IPs) == 0 {
|
||||||
ip, err := utils.GetIP()
|
ip, err := utils.GetIP()
|
||||||
|
Reference in New Issue
Block a user