object instead of string
This commit is contained in:
@ -54,9 +54,9 @@ func (s *WebRTC) Set() {
|
||||
s.ICELite = viper.GetBool("icelite")
|
||||
s.ICEServers = []webrtc.ICEServer{{URLs: viper.GetStringSlice("iceserver")}}
|
||||
if (viper.GetString("iceservers") != "") {
|
||||
errj := json.Unmarshal([]byte(viper.GetString("iceservers")), &s.ICEServers)
|
||||
if (errj != nil) {
|
||||
panic(errj)
|
||||
err := json.Unmarshal([]byte(viper.GetString("iceservers")), &s.ICEServers)
|
||||
if (err != nil) {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
s.NAT1To1IPs = viper.GetStringSlice("nat1to1")
|
||||
|
@ -2,6 +2,8 @@ package message
|
||||
|
||||
import (
|
||||
"n.eko.moe/neko/internal/types"
|
||||
|
||||
"github.com/pion/webrtc/v3"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
@ -18,7 +20,7 @@ type SignalProvide struct {
|
||||
ID string `json:"id"`
|
||||
SDP string `json:"sdp"`
|
||||
Lite bool `json:"lite"`
|
||||
ICE string `json:"ice"`
|
||||
ICE []webrtc.ICEServer `json:"ice"`
|
||||
}
|
||||
|
||||
type SignalAnswer struct {
|
||||
|
Reference in New Issue
Block a user