v1

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeMagnet    = "magnet"    // TypeMagnet contains a magnet link
	TypePause     = "pause"     // TypePause synchronizes play/pause state
	TypePosition  = "position"  // TypePosition synchronizes seek positions
	TypeBuffering = "buffering" // TypeBuffering synchronizes buffering state
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffering

type Buffering struct {
	Message
	Buffering bool `json:"buffering"` // Whether to show the buffering state
}

Buffering synchronizes buffering state

func NewBuffering

func NewBuffering(buffering bool) *Buffering

type Magnet

type Magnet struct {
	Message
	Magnet      string     `json:"magnet"`      // Encapsulated magnet link
	Path        string     `json:"path"`        // Path of the media to play
	Title       string     `json:"title"`       // Title of the media to play
	Description string     `json:"description"` // Description of the media to play
	Subtitles   []Subtitle `json:"subtitles"`   // Subtitles of the media to play
}

Magnet contains a magnet link

func NewMagnetLink(magnet, path, title, description string, subtitles []Subtitle) *Magnet

type Message

type Message struct {
	Type string `json:"type"` // Message type to unmarshal to
}

Message is a generic message container

type Pause

type Pause struct {
	Message
	Pause bool `json:"pause"` // Whether to pause or play
}

Pause synchronizes play/pause state

func NewPause

func NewPause(pause bool) *Pause

type Position

type Position struct {
	Message
	Position float64 `json:"position"` // Position to seek to
}

Position synchronizes seek positions

func NewPosition

func NewPosition(position float64) *Position

type Subtitle

type Subtitle struct {
	Name string `json:"name"` // Name of the subtitle
	Size int    `json:"size"` // Size of the subtitle file
}

Subtitle describes a subtitle file

Jump to

Keyboard shortcuts

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