webrtc

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRtcpChan added in v1.6.9

func WithRtcpChan(rtcp chan []rtcp.Packet) option

func WithVideoAuto added in v1.6.7

func WithVideoAuto(auto bool) option

Types

type Track added in v1.6.4

type Track struct {
	// contains filtered or unexported fields
}

func NewTrack added in v1.6.4

func NewTrack(logger zerolog.Logger, codec codec.RTPCodec, connection *webrtc.PeerConnection, opts ...option) (*Track, error)

func (*Track) OnBitrateChange added in v1.6.4

func (t *Track) OnBitrateChange(f func(bitrate int) (bool, error))

func (*Track) OnVideoChange added in v1.6.7

func (t *Track) OnVideoChange(f func(string) (bool, error))

func (*Track) RemoveStream added in v1.6.4

func (t *Track) RemoveStream()

func (*Track) SetBitrate added in v1.6.4

func (t *Track) SetBitrate(bitrate int) (bool, error)

func (*Track) SetPaused added in v1.6.4

func (t *Track) SetPaused(paused bool)

func (*Track) SetStream added in v1.6.4

func (t *Track) SetStream(stream types.StreamSinkManager) (bool, error)

func (*Track) SetVideoAuto added in v1.6.7

func (t *Track) SetVideoAuto(auto bool)

func (*Track) SetVideoID added in v1.6.7

func (t *Track) SetVideoID(videoID string) (bool, error)

func (*Track) Shutdown added in v1.6.9

func (t *Track) Shutdown()

func (*Track) VideoAuto added in v1.6.7

func (t *Track) VideoAuto() bool

func (*Track) WriteSample added in v1.6.9

func (t *Track) WriteSample(sample types.Sample)

type WebRTCManagerCtx

type WebRTCManagerCtx struct {
	// contains filtered or unexported fields
}

func New

func New(desktop types.DesktopManager, capture types.CaptureManager, config *config.WebRTC) *WebRTCManagerCtx

func (*WebRTCManagerCtx) CreatePeer

func (manager *WebRTCManagerCtx) CreatePeer(session types.Session, bitrate int, videoAuto bool) (*webrtc.SessionDescription, error)

func (*WebRTCManagerCtx) ICEServers

func (manager *WebRTCManagerCtx) ICEServers() []types.ICEServer

func (*WebRTCManagerCtx) SetCursorPosition

func (manager *WebRTCManagerCtx) SetCursorPosition(x, y int)

func (*WebRTCManagerCtx) Shutdown

func (manager *WebRTCManagerCtx) Shutdown() error

func (*WebRTCManagerCtx) Start

func (manager *WebRTCManagerCtx) Start()

type WebRTCPeerCtx

type WebRTCPeerCtx struct {
	// contains filtered or unexported fields
}

func (*WebRTCPeerCtx) CreateAnswer

func (peer *WebRTCPeerCtx) CreateAnswer() (*webrtc.SessionDescription, error)

func (*WebRTCPeerCtx) CreateOffer

func (peer *WebRTCPeerCtx) CreateOffer(ICERestart bool) (*webrtc.SessionDescription, error)

func (*WebRTCPeerCtx) Destroy

func (peer *WebRTCPeerCtx) Destroy()

func (*WebRTCPeerCtx) GetVideoID added in v1.6.7

func (peer *WebRTCPeerCtx) GetVideoID() string

TODO: Refactor.

func (*WebRTCPeerCtx) SendCursorImage

func (peer *WebRTCPeerCtx) SendCursorImage(cur *types.CursorImage, img []byte) error

func (*WebRTCPeerCtx) SendCursorPosition

func (peer *WebRTCPeerCtx) SendCursorPosition(x, y int) error

func (*WebRTCPeerCtx) SetAnswer

func (peer *WebRTCPeerCtx) SetAnswer(sdp string) error

func (*WebRTCPeerCtx) SetCandidate

func (peer *WebRTCPeerCtx) SetCandidate(candidate webrtc.ICECandidateInit) error

func (*WebRTCPeerCtx) SetOffer

func (peer *WebRTCPeerCtx) SetOffer(sdp string) error

func (*WebRTCPeerCtx) SetPaused

func (peer *WebRTCPeerCtx) SetPaused(isPaused bool) error

func (*WebRTCPeerCtx) SetVideoAuto added in v1.6.7

func (peer *WebRTCPeerCtx) SetVideoAuto(auto bool)

func (*WebRTCPeerCtx) SetVideoBitrate added in v1.6.4

func (peer *WebRTCPeerCtx) SetVideoBitrate(peerBitrate int) error

func (*WebRTCPeerCtx) SetVideoID

func (peer *WebRTCPeerCtx) SetVideoID(videoID string) error

func (*WebRTCPeerCtx) VideoAuto added in v1.6.7

func (peer *WebRTCPeerCtx) VideoAuto() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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