webrtc

package
v0.0.0-...-76f454d Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure()

func GetStreamKeys

func GetStreamKeys(pool *pgxpool.Pool, ctx context.Context) ([]string, error)

func PopulateMediaEngine

func PopulateMediaEngine(m *webrtc.MediaEngine) error

func WHEP

func WHEP(offer, streamKey string) (string, string, error)

func WHEPChangeLayer

func WHEPChangeLayer(whepSessionId, layer string) error

func WHEPLayers

func WHEPLayers(whepSessionId string) ([]byte, error)

func WHIP

func WHIP(offer string, streamer *Streamer) (string, error)

Types

type StreamStatus

type StreamStatus struct {
	Streamer             string              `json:"streamer"`
	FirstSeenEpoch       uint64              `json:"firstSeenEpoch"`
	AudioPacketsReceived uint64              `json:"audioPacketsReceived"`
	VideoStreams         []StreamStatusVideo `json:"videoStreams"`
	WHEPSessions         []whepSessionStatus `json:"whepSessions"`
}

func GetStreamStatus

func GetStreamStatus(streamKey string) StreamStatus

type StreamStatusVideo

type StreamStatusVideo struct {
	RID              string    `json:"rid"`
	PacketsReceived  uint64    `json:"packetsReceived"`
	LastKeyFrameSeen time.Time `json:"lastKeyFrameSeen"`
}

type Streamer

type Streamer struct {
	Name      string `db:name`
	AuthToken string `db:auth_token`
	StreamKey string
}

func NewStreamer

func NewStreamer(pool *pgxpool.Pool, ctx context.Context, token []string) *Streamer

Jump to

Keyboard shortcuts

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