nativeviewer

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Current          func() bool
	Type             string
	ShareID          string
	ConnectionID     string
	Candidate        *webrtc.ICECandidateInit
	State            string
	LocalType        string
	RemoteType       string
	NatTraversalPath string
	Quality          *mediaedge.QualitySample
}

type OfferResult added in v1.5.6

type OfferResult struct {
	Answer webrtc.SessionDescription
	Audio  bool
	Codec  string
	Reused bool
}

type Options

type Options struct {
	ShareID      string
	EdgeCapacity int
	PortMapping  bool
	Events       chan<- Event
	Relay        *mediaedge.RelayOptions
}

type Session

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

Session owns the native media implementation for one Browser Viewer. Room, participant, route, and recovery authority remain in the Browser/server.

func Start

func Start(parent context.Context, options Options) (*Session, error)

func (*Session) AcceptOffer

func (session *Session) AcceptOffer(
	connectionID string,
	offer webrtc.SessionDescription,
	iceServers []webrtc.ICEServer,
	reuse bool,
) (OfferResult, error)

func (*Session) AddCandidate

func (session *Session) AddCandidate(connectionID string, candidate *webrtc.ICECandidateInit) error

func (*Session) AddReceiverCandidate

func (session *Session) AddReceiverCandidate(
	connectionID string,
	candidate *webrtc.ICECandidateInit,
) error

func (*Session) Close

func (session *Session) Close() error

func (*Session) CloseEdge

func (session *Session) CloseEdge(connectionID string)

func (*Session) CloseReceiver

func (session *Session) CloseReceiver(connectionID string)

func (*Session) PrepareEdge

func (session *Session) PrepareEdge(
	sourceConnectionID string,
	connectionID string,
	iceServers []webrtc.ICEServer,
) (webrtc.SessionDescription, error)

func (*Session) PrepareLocalEdge

func (session *Session) PrepareLocalEdge(
	sourceConnectionID string,
	connectionID string,
) (webrtc.SessionDescription, error)

func (*Session) SetAnswer

func (session *Session) SetAnswer(connectionID string, answer webrtc.SessionDescription) error

func (*Session) ShareID

func (session *Session) ShareID() string

func (*Session) UpdateProfile

func (session *Session) UpdateProfile(profile nativecapture.VideoProfile) error

UpdateProfile records the Host ceiling; receiving alone never starts derivation.

Jump to

Keyboard shortcuts

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