diff --git a/internal/types/webrtc.go b/internal/types/webrtc.go index d0da61e7..d22253bd 100644 --- a/internal/types/webrtc.go +++ b/internal/types/webrtc.go @@ -13,6 +13,5 @@ type WebRTCManager interface { type Peer interface { SignalAnswer(sdp string) error - WriteData(v interface{}) error Destroy() error } diff --git a/internal/webrtc/peer.go b/internal/webrtc/peer.go index f82c4fa7..59f66dbd 100644 --- a/internal/webrtc/peer.go +++ b/internal/webrtc/peer.go @@ -1,8 +1,6 @@ package webrtc import ( - "sync" - "github.com/pion/webrtc/v2" ) @@ -14,19 +12,12 @@ type Peer struct { settings *webrtc.SettingEngine connection *webrtc.PeerConnection configuration *webrtc.Configuration - mu sync.Mutex } func (peer *Peer) SignalAnswer(sdp string) error { return peer.connection.SetRemoteDescription(webrtc.SessionDescription{SDP: sdp, Type: webrtc.SDPTypeAnswer}) } -func (peer *Peer) WriteData(v interface{}) error { - peer.mu.Lock() - defer peer.mu.Unlock() - return nil -} - func (peer *Peer) Destroy() error { if peer.connection != nil && peer.connection.ConnectionState() == webrtc.PeerConnectionStateConnected { if err := peer.connection.Close(); err != nil {