About

Get Started

Docs

webrtc

import "github.com/gosolid/solid/pkg/runtime/webrtc"

Index

Variables

var PeerConnectionStateClosed = "closed"
var PeerConnectionStateConnecting = "connecting"
var PeerConnectionStateOpen = "open"

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) Read

func (d *DataChannel) Read(bytes []byte) (int, error)

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)

func (*DataChannel) Write

func (d *DataChannel) Write(bytes []byte) (int, error)

type DataChannelOptions

type DataChannelOptions = webrtc.DataChannelInit

type ICECandidate

type ICECandidate webrtc.ICECandidateInit

type ID

type ID string

func NewID

func NewID() ID

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 NewWebRTC

func NewWebRTC() *WebRTC

func (*WebRTC) NewPeerConnection

func (rtc *WebRTC) NewPeerConnection(id ID, iceServers []string) (*PeerConnection, error)

func (*WebRTC) V8FuncCreatePeerConnection

func (rtc *WebRTC) V8FuncCreatePeerConnection(in isolates.FunctionArgs) (*isolates.Value, error)

Up next

worker_threads