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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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