ayame

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResultMessage

type AuthResultMessage struct {
	Type          string       `json:"type"` // accept, reject
	IsExistClient bool         `json:"isExistClient"`
	AuthzMetadata interface{}  `json:"authzMetadata,omitempty"`
	IceServers    []*IceServer `json:"iceServers,omitempty"`
	Reason        string       `json:"reason"`
}

type AyameConn

type AyameConn struct {
	Msg        <-chan *SignalingMessage
	AuthResult *AuthResultMessage
	LastError  error
	// contains filtered or unexported fields
}

func Dial

func Dial(signalingUrl, roomID, signalingKey string) (*AyameConn, error)

func StartClient

func StartClient(soc JsonSocket, roomID, signalingKey string) (*AyameConn, error)

func (*AyameConn) Answer

func (c *AyameConn) Answer(sdp string) error

func (*AyameConn) Candidate

func (c *AyameConn) Candidate(candidate string, id *string, index *uint16) error

func (*AyameConn) Close

func (c *AyameConn) Close()

func (*AyameConn) Done

func (c *AyameConn) Done() <-chan struct{}

func (*AyameConn) Offer

func (c *AyameConn) Offer(sdp string) error

type EmptyMessage

type EmptyMessage struct {
	Type string `json:"type"`
}

type ICECandidate

type ICECandidate struct {
	Candidate     string  `json:"candidate"`
	SdpMid        *string `json:"sdpMid,omitempty"`
	SdpMLineIndex *uint16 `json:"sdpMLineIndex,omitempty"`
}

type IceServer

type IceServer struct {
	URLs       []string    `json:"urls"`
	Username   string      `json:"username,omitempty"`
	Credential interface{} `json:"credential,omitempty"`
}

type JsonSocket

type JsonSocket interface {
	WriteJSON(v any) error
	ReadJSON(v any) error
	Close() error
}

type RegisterMessage

type RegisterMessage struct {
	Type          string      `json:"type"` // register
	RoomID        string      `json:"roomId"`
	ClientID      string      `json:"clientId,omitempty"`
	AuthnMetadata interface{} `json:"authnMetadata,omitempty"`
	SignalingKey  string      `json:"signalingKey,omitempty"`
}

type SignalingMessage

type SignalingMessage struct {
	Type string        `json:"type"`          // offer, answer, candidate
	SDP  string        `json:"sdp,omitempty"` // offer, answer
	ICE  *ICECandidate `json:"ice,omitempty"` // candidate
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL