stream

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RolePublisher = "publisher"
	RoleViewer    = "viewer"

	SourceTypeScreen      = "screen"
	SourceTypeApplication = "application"

	AudioModeDesktop     = "desktop"
	AudioModeApplication = "application"
	AudioModeNone        = "none"
)

Variables

This section is empty.

Functions

func ChannelKey

func ChannelKey(channelID int64) string

func MetaKey

func MetaKey(streamID int64) string

func RebindKey

func RebindKey(streamID int64) string

func RouteKey

func RouteKey(streamID int64) string

func UserKey

func UserKey(userID int64) string

Types

type ActiveStream

type ActiveStream struct {
	ID         int64  `json:"id"`
	ChannelID  int64  `json:"channel_id"`
	SourceType string `json:"source_type"`
	AudioMode  string `json:"audio_mode"`
	StartedAt  int64  `json:"started_at"`
}

ActiveStream is the user-facing metadata shared across API, presence, and guild events for an active stream in a voice channel.

type Claims

type Claims struct {
	helper.Claims
	StreamID    int64  `json:"stream_id"`
	ChannelID   int64  `json:"channel_id"`
	GuildID     int64  `json:"guild_id"`
	OwnerUserID int64  `json:"owner_user_id"`
	RouteID     string `json:"route_id"`
	Role        string `json:"role"`
	SourceType  string `json:"source_type,omitempty"`
	AudioMode   string `json:"audio_mode,omitempty"`
}

type Metadata

type Metadata struct {
	ActiveStream
	GuildID      int64  `json:"guild_id"`
	OwnerUserID  int64  `json:"owner_user_id"`
	Region       string `json:"region,omitempty"`
	RouteID      string `json:"route_id,omitempty"`
	RouteURL     string `json:"route_url,omitempty"`
	PublisherSID string `json:"publisher_session_id,omitempty"`
}

Metadata is the backend representation of an active stream route/state.

type RouteBinding

type RouteBinding struct {
	ID     string `json:"id"`
	URL    string `json:"url"`
	Region string `json:"region,omitempty"`
}

RouteBinding pins a stream to a specific stream service instance.

Jump to

Keyboard shortcuts

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