Documentation ¶
Index ¶
- Variables
- type AnswerMessage
- type AnswerResponse
- type DataChannel
- func (d *DataChannel) Close() error
- func (d *DataChannel) IsOpen() bool
- func (d *DataChannel) Label() string
- func (d *DataChannel) Read(bytes []byte) (int, error)
- func (d *DataChannel) V8FuncClose(in isolates.FunctionArgs) (*isolates.Value, error)
- func (d *DataChannel) V8FuncRead(in isolates.FunctionArgs) (*isolates.Value, error)
- func (d *DataChannel) V8FuncWrite(in isolates.FunctionArgs) (*isolates.Value, error)
- func (d *DataChannel) V8GetIsOpen(in isolates.GetterArgs) (*isolates.Value, error)
- func (d *DataChannel) V8GetLabel(in isolates.GetterArgs) (*isolates.Value, error)
- func (d *DataChannel) Write(bytes []byte) (int, error)
- type DataChannelOptions
- type ICECandidate
- type ID
- type OfferMessage
- type PeerConnection
- func (c *PeerConnection) AddICECandidate(candidate *ICECandidate) error
- func (c *PeerConnection) Close() error
- func (c *PeerConnection) CreateAnswer(offer *SessionDescription) (*SessionDescription, error)
- func (c *PeerConnection) CreateDataChannel(options *DataChannelOptions) (*DataChannel, error)
- func (c *PeerConnection) CreateOffer() (*SessionDescription, error)
- func (c *PeerConnection) DataChannels() []*DataChannel
- func (c *PeerConnection) OnAnswer(answer *SessionDescription) error
- func (c *PeerConnection) OnClose(callback func() error) func()
- func (c *PeerConnection) OnConnected(callback func() error) func()
- func (c *PeerConnection) OnConnecting(callback func() error) func()
- func (c *PeerConnection) OnConnectionStateChange(callback func(c PeerConnectionState) error) func()
- func (c *PeerConnection) OnICECandidate(callback func(i *ICECandidate) error) func()
- func (c *PeerConnection) OnRemoteDataChannel(callback func(*DataChannel) error) func()
- func (c *PeerConnection) State() PeerConnectionState
- func (c *PeerConnection) V8FuncAddICECandidate(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *PeerConnection) V8FuncClose(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *PeerConnection) V8FuncCreateAnswer(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *PeerConnection) V8FuncCreateDataChannel(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *PeerConnection) V8FuncCreateOffer(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *PeerConnection) V8FuncWait(in isolates.FunctionArgs) (*isolates.Value, error)
- func (c *PeerConnection) V8GetChannels(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *PeerConnection) V8GetState(in isolates.GetterArgs) (*isolates.Value, error)
- func (c *PeerConnection) Wait() error
- type PeerConnectionState
- type SessionDescription
- type WebRTC
Constants ¶
This section is empty.
Variables ¶
View Source
var PeerConnectionStateClosed = "closed"
View Source
var PeerConnectionStateConnecting = "connecting"
View Source
var PeerConnectionStateOpen = "open"
Functions ¶
This section is empty.
Types ¶
type AnswerMessage ¶
type AnswerMessage struct {
SessionDescription *SessionDescription `json:"sessionDescription"`
}
type AnswerResponse ¶
type AnswerResponse struct {
ID ID
}
type DataChannel ¶
type DataChannel struct {
// contains filtered or unexported fields
}
func NewDataChannel ¶
func NewDataChannel() *DataChannel
func (*DataChannel) Close ¶
func (d *DataChannel) Close() error
func (*DataChannel) IsOpen ¶
func (d *DataChannel) IsOpen() bool
func (*DataChannel) Label ¶
func (d *DataChannel) Label() string
func (*DataChannel) V8FuncClose ¶
func (d *DataChannel) V8FuncClose(in isolates.FunctionArgs) (*isolates.Value, error)
func (*DataChannel) V8FuncRead ¶
func (d *DataChannel) V8FuncRead(in isolates.FunctionArgs) (*isolates.Value, error)
func (*DataChannel) V8FuncWrite ¶
func (d *DataChannel) V8FuncWrite(in isolates.FunctionArgs) (*isolates.Value, error)
func (*DataChannel) V8GetIsOpen ¶
func (d *DataChannel) V8GetIsOpen(in isolates.GetterArgs) (*isolates.Value, error)
func (*DataChannel) V8GetLabel ¶
func (d *DataChannel) V8GetLabel(in isolates.GetterArgs) (*isolates.Value, error)
type DataChannelOptions ¶
type DataChannelOptions = webrtc.DataChannelInit
type ICECandidate ¶
type ICECandidate webrtc.ICECandidateInit
type OfferMessage ¶
type OfferMessage struct { ID ID SessionDescription *SessionDescription `json:"sessionDescription"` }
type PeerConnection ¶
type PeerConnection struct { ID ID // contains filtered or unexported fields }
func NewPeerConnection ¶
func NewPeerConnection(id ID, iceServers []string) (*PeerConnection, error)
func (*PeerConnection) AddICECandidate ¶
func (c *PeerConnection) AddICECandidate(candidate *ICECandidate) error
func (*PeerConnection) Close ¶
func (c *PeerConnection) Close() error
func (*PeerConnection) CreateAnswer ¶
func (c *PeerConnection) CreateAnswer(offer *SessionDescription) (*SessionDescription, error)
func (*PeerConnection) CreateDataChannel ¶
func (c *PeerConnection) CreateDataChannel(options *DataChannelOptions) (*DataChannel, error)
func (*PeerConnection) CreateOffer ¶
func (c *PeerConnection) CreateOffer() (*SessionDescription, error)
func (*PeerConnection) DataChannels ¶
func (c *PeerConnection) DataChannels() []*DataChannel
func (*PeerConnection) OnAnswer ¶
func (c *PeerConnection) OnAnswer(answer *SessionDescription) error
func (*PeerConnection) OnClose ¶
func (c *PeerConnection) OnClose(callback func() error) func()
func (*PeerConnection) OnConnected ¶
func (c *PeerConnection) OnConnected(callback func() error) func()
func (*PeerConnection) OnConnecting ¶
func (c *PeerConnection) OnConnecting(callback func() error) func()
func (*PeerConnection) OnConnectionStateChange ¶
func (c *PeerConnection) OnConnectionStateChange(callback func(c PeerConnectionState) error) func()
func (*PeerConnection) OnICECandidate ¶
func (c *PeerConnection) OnICECandidate(callback func(i *ICECandidate) error) func()
func (*PeerConnection) OnRemoteDataChannel ¶
func (c *PeerConnection) OnRemoteDataChannel(callback func(*DataChannel) error) func()
func (*PeerConnection) State ¶
func (c *PeerConnection) State() PeerConnectionState
func (*PeerConnection) V8FuncAddICECandidate ¶
func (c *PeerConnection) V8FuncAddICECandidate(in isolates.FunctionArgs) (*isolates.Value, error)
func (*PeerConnection) V8FuncClose ¶
func (c *PeerConnection) V8FuncClose(in isolates.FunctionArgs) (*isolates.Value, error)
func (*PeerConnection) V8FuncCreateAnswer ¶
func (c *PeerConnection) V8FuncCreateAnswer(in isolates.FunctionArgs) (*isolates.Value, error)
func (*PeerConnection) V8FuncCreateDataChannel ¶
func (c *PeerConnection) V8FuncCreateDataChannel(in isolates.FunctionArgs) (*isolates.Value, error)
func (*PeerConnection) V8FuncCreateOffer ¶
func (c *PeerConnection) V8FuncCreateOffer(in isolates.FunctionArgs) (*isolates.Value, error)
func (*PeerConnection) V8FuncWait ¶
func (c *PeerConnection) V8FuncWait(in isolates.FunctionArgs) (*isolates.Value, error)
func (*PeerConnection) V8GetChannels ¶
func (c *PeerConnection) V8GetChannels(in isolates.GetterArgs) (*isolates.Value, error)
func (*PeerConnection) V8GetState ¶
func (c *PeerConnection) V8GetState(in isolates.GetterArgs) (*isolates.Value, error)
func (*PeerConnection) Wait ¶
func (c *PeerConnection) Wait() error
type PeerConnectionState ¶
type PeerConnectionState = string
type SessionDescription ¶
type SessionDescription webrtc.SessionDescription
type WebRTC ¶
type WebRTC struct {
// contains filtered or unexported fields
}
func (*WebRTC) NewPeerConnection ¶
func (rtc *WebRTC) NewPeerConnection(id ID, iceServers []string) (*PeerConnection, error)
func (*WebRTC) V8FuncCreatePeerConnection ¶
Click to show internal directories.
Click to hide internal directories.