mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
go fmt whole project.
This commit is contained in:
parent
c7a178e5a4
commit
f85d4d312f
@ -127,7 +127,7 @@ func (session *Session) SignalCandidate(data string) error {
|
||||
return session.socket.Send(&message.SignalCandidate{
|
||||
Event: event.SIGNAL_CANDIDATE,
|
||||
Data: data,
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
func (session *Session) destroy() error {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"strings"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
@ -46,16 +46,15 @@ func (WebRTC) Init(cmd *cobra.Command) error {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *WebRTC) Set() {
|
||||
s.ICELite = viper.GetBool("icelite")
|
||||
s.ICEServers = []webrtc.ICEServer{{URLs: viper.GetStringSlice("iceserver")}}
|
||||
if (viper.GetString("iceservers") != "") {
|
||||
if viper.GetString("iceservers") != "" {
|
||||
err := json.Unmarshal([]byte(viper.GetString("iceservers")), &s.ICEServers)
|
||||
if (err != nil) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
@ -142,12 +142,12 @@ func (manager *WebRTCManager) CreatePeer(id string, session types.Session) (stri
|
||||
Msg("connection state has changed")
|
||||
})
|
||||
|
||||
rtpVideo, err := connection.AddTrack(manager.videoTrack);
|
||||
rtpVideo, err := connection.AddTrack(manager.videoTrack)
|
||||
if err != nil {
|
||||
return "", manager.config.ICELite, manager.config.ICEServers, err
|
||||
}
|
||||
|
||||
rtpAudio, err := connection.AddTrack(manager.audioTrack);
|
||||
rtpAudio, err := connection.AddTrack(manager.audioTrack)
|
||||
if err != nil {
|
||||
return "", manager.config.ICELite, manager.config.ICEServers, err
|
||||
}
|
||||
@ -230,7 +230,6 @@ func (manager *WebRTCManager) CreatePeer(id string, session types.Session) (stri
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
return description.SDP, manager.config.ICELite, manager.config.ICEServers, nil
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,6 @@ func (h *MessageHandler) Message(id string, raw []byte) error {
|
||||
return h.controlKeyboard(id, session, payload)
|
||||
}), "%s failed", header.Event)
|
||||
|
||||
|
||||
// Chat Events
|
||||
case event.CHAT_MESSAGE:
|
||||
payload := &message.ChatReceive{}
|
||||
|
@ -10,10 +10,10 @@ import "C"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"sync"
|
||||
"time"
|
||||
"unsafe"
|
||||
"regexp"
|
||||
|
||||
"n.eko.moe/neko/internal/types"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user