Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RoomConnection ¶
func StreamConn ¶
Types ¶
type PeerConnectionState ¶
type PeerConnectionState struct {
PeerConnection *webrtc.PeerConnection
Websocket *ThreadSafeWriter
}
func NewPeerConnectionState ¶
func NewPeerConnectionState() *PeerConnectionState
type Peers ¶
type Peers struct {
ListLock sync.RWMutex
Connections []PeerConnectionState
TrackLocals map[string]*webrtc.TrackLocalStaticRTP
}
func (*Peers) AddTrack ¶
func (p *Peers) AddTrack(t *webrtc.TrackRemote) *webrtc.TrackLocalStaticRTP
func (*Peers) DispatchKeyFrame ¶
func (p *Peers) DispatchKeyFrame()
func (*Peers) RemoveTrack ¶
func (p *Peers) RemoveTrack(t *webrtc.TrackLocalStaticRTP)
func (*Peers) SignalPeerConnections ¶
func (p *Peers) SignalPeerConnections()
type ThreadSafeWriter ¶
func (*ThreadSafeWriter) WriteJSON ¶
func (t *ThreadSafeWriter) WriteJSON(v interface{}) error
Click to show internal directories.
Click to hide internal directories.