mpv

package
v0.53.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	*io.PipeReader
	// contains filtered or unexported fields
}

func (*Executor) Cancel

func (j *Executor) Cancel() error

type MpvTrack

type MpvTrack struct {
	MediaFile     model.MediaFile
	PlaybackDone  chan bool
	Conn          *mpvipc.Connection
	IPCSocketName string
	Exe           *Executor
	CloseCalled   bool
}

func NewTrack

func NewTrack(ctx context.Context, playbackDoneChannel chan bool, deviceName string, mf model.MediaFile) (*MpvTrack, error)

func (*MpvTrack) Close

func (t *MpvTrack) Close()

func (*MpvTrack) IsPlaying

func (t *MpvTrack) IsPlaying() bool

func (*MpvTrack) Pause

func (t *MpvTrack) Pause()

func (*MpvTrack) Position

func (t *MpvTrack) Position() int

Position returns the playback position in seconds. Every now and then the mpv IPC interface returns "mpv error: property unavailable" in this case we have to retry

func (*MpvTrack) SetPosition

func (t *MpvTrack) SetPosition(offset int) error

func (*MpvTrack) SetVolume

func (t *MpvTrack) SetVolume(value float32)

Used to control the playback volume. A float value between 0.0 and 1.0.

func (*MpvTrack) String

func (t *MpvTrack) String() string

func (*MpvTrack) Unpause

func (t *MpvTrack) Unpause()

Jump to

Keyboard shortcuts

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