ui

package
v0.0.0-...-ba78ddb Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAudioOffset = -1
View Source
const DownKeyInterval = 5
View Source
const FooterHeight = 120
View Source
const LeftKeyInterval = 10
View Source
const RightKeyInterval = 10
View Source
const UpKeyInterval = 5
View Source
const VisibilityTimeOut = int64(3000)

Variables

This section is empty.

Functions

func AudioStreamers

func AudioStreamers(sampleSource <-chan [2]float64) beep.Streamer

Types

type C

type C = layout.Context

type CurrentView

type CurrentView int
const (
	StateView CurrentView = iota
	VideoView
)

type D

type D = layout.Dimensions

type KeyAction

type KeyAction int
const (
	ActionIncrement KeyAction = iota
	ActionDecrement
)

type Player

type Player struct {
	*app.Window

	RightKeyPressed bool
	UpKeyPressed    bool
	LeftKeyPressed  bool
	DownKeyPressed  bool
	SpaceKeyPressed bool
	EscKeyPressed   bool

	RightKeyLastUpdated int64
	UpKeyLastUpdated    int64
	LeftKeyLastUpdated  int64
	DownKeyLastUpdated  int64
	SpaceKeyLastUpdated int64
	EscKeyLastUpdated   int64
	// contains filtered or unexported fields
}

func (*Player) CurrentView

func (p *Player) CurrentView() CurrentView

func (*Player) FilePath

func (p *Player) FilePath() string

func (*Player) InitializeSpeakers

func (p *Player) InitializeSpeakers()

func (*Player) IsPathValid

func (p *Player) IsPathValid() bool

func (*Player) Layout

func (p *Player) Layout(gtx C) D

func (*Player) OnVideoPathChanged

func (p *Player) OnVideoPathChanged()

func (*Player) SetCurrentView

func (p *Player) SetCurrentView(v CurrentView)

type PlayerStatus

type PlayerStatus int
const (
	Idle PlayerStatus = iota
	Loading
	Playing
	Paused
	Stopped
)

type View

type View interface {
	Layout(C, ...interface{}) D
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳