Documentation ¶
Index ¶
- Constants
- type GrabberInitPeerMessage
- type GrabberMessage
- type GrabberMessageEvent
- type IceMessage
- type OfferAnswerMessage
- type OfferMessage
- type PcConfigMessage
- type Peer
- type PeerConnectionConfig
- type PeerStatus
- type PlayerAuth
- type PlayerAuthMessage
- type PlayerMessage
- type PlayerMessageEvent
- type StreamType
Constants ¶
View Source
const ( PlayerMessageEventAuth = PlayerMessageEvent("auth") PlayerMessageEventAuthRequest = PlayerMessageEvent("auth:request") PlayerMessageEventAuthFailed = PlayerMessageEvent("auth:failed") PlayerMessageEventInitPeer = PlayerMessageEvent("init_peer") PlayerMessageEventPeerStatus = PlayerMessageEvent("peers") PlayerMessageEventOffer = PlayerMessageEvent("offer") PlayerMessageEventOfferFailed = PlayerMessageEvent("offer:failed") PlayerMessageEventOfferAnswer = PlayerMessageEvent("offer_answer") PlayerMessageEventGrabberIce = PlayerMessageEvent("grabber_ice") PlayerMessageEventPlayerIce = PlayerMessageEvent("player_ice") )
View Source
const ( GrabberMessageEventPing = GrabberMessageEvent("ping") GrabberMessageEventInitPeer = GrabberMessageEvent("init_peer") GrabberMessageEventOffer = GrabberMessageEvent("offer") GrabberMessageEventOfferAnswer = GrabberMessageEvent("offer_answer") GrabberMessageEventGrabberIce = GrabberMessageEvent("grabber_ice") GrabberMessageEventPlayerIce = GrabberMessageEvent("player_ice") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrabberInitPeerMessage ¶
type GrabberInitPeerMessage struct { PcConfigMessage PingInterval int `json:"pingInterval"` }
type GrabberMessage ¶
type GrabberMessage struct { Event GrabberMessageEvent `json:"event"` Ping *PeerStatus `json:"ping"` InitPeer *GrabberInitPeerMessage `json:"initPeer"` Offer *OfferMessage `json:"offer"` OfferAnswer *OfferAnswerMessage `json:"offerAnswer"` Ice *IceMessage `json:"ice"` }
type GrabberMessageEvent ¶
type GrabberMessageEvent string
type IceMessage ¶
type OfferAnswerMessage ¶
type OfferAnswerMessage struct { PeerId string `json:"peerId"` Answer webrtc.SessionDescription `json:"answer"` }
type OfferMessage ¶
type PcConfigMessage ¶
type PcConfigMessage struct {
PcConfig PeerConnectionConfig `json:"pcConfig"`
}
type PeerConnectionConfig ¶
type PeerConnectionConfig struct { IceServers []struct { Urls string `json:"urls"` Username *string `json:"username"` Credential *string `json:"credential"` } `json:"iceServers"` }
func (PeerConnectionConfig) WebrtcConfiguration ¶
func (c PeerConnectionConfig) WebrtcConfiguration() webrtc.Configuration
type PeerStatus ¶
type PeerStatus struct { ConnectionsCount int StreamTypes []StreamType }
type PlayerAuth ¶
type PlayerAuth struct {
Credential string `json:"credential"`
}
type PlayerAuthMessage ¶
type PlayerAuthMessage struct {
Credential string `json:"credential"`
}
type PlayerMessage ¶
type PlayerMessage struct { Event PlayerMessageEvent `json:"event"` PlayerAuth *PlayerAuthMessage `json:"playerAuth"` PeersStatus []Peer `json:"peersStatus"` ParticipantsStatus []Peer `json:"participantsStatus"` Offer *OfferMessage `json:"offer"` OfferAnswer *OfferAnswerMessage `json:"offerAnswer"` Ice *IceMessage `json:"ice"` InitPeer *PcConfigMessage `json:"initPeer"` AccessMessage *string `json:"accessMessage"` }
type PlayerMessageEvent ¶
type PlayerMessageEvent string
type StreamType ¶
type StreamType string
const ( DesktopStreamType StreamType = "desktop" WebcamStreamType StreamType = "webcam" )
Click to show internal directories.
Click to hide internal directories.