Documentation ¶
Overview ¶
Package mpv provides a github.com/frizinak/libym/player.Backend implementation for both libmpv and mpv through rpc.
Index ¶
- type Backend
- type Event
- type EventID
- type MPV
- func (m *MPV) Close() error
- func (m *MPV) Duration() time.Duration
- func (m *MPV) IncreaseVolume(n float64)
- func (m *MPV) Init() error
- func (m *MPV) Pause(pause bool)
- func (m *MPV) Paused() bool
- func (m *MPV) Play(file string) (chan struct{}, error)
- func (m *MPV) Position() time.Duration
- func (m *MPV) Seek(adjustment time.Duration, whence int)
- func (m *MPV) SeekTo(to float64)
- func (m *MPV) SetVolume(n float64)
- func (m *MPV) Stop()
- func (m *MPV) TogglePause()
- func (m *MPV) Volume() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Init(chan<- Event) error Close() error GetPropertyDouble(string) (float64, error) SetPropertyDouble(string, float64) error SetPropertyString(string, string) error SetPropertyBool(string, bool) error Command(...string) error }
Backend is a generic mpv interface. Applicable to both libmpv and mpv through rpc.
type MPV ¶
type MPV struct {
// contains filtered or unexported fields
}
MPV is an abstraction of Backend to provide the same interface to multiple mpv implementations.
func (*MPV) IncreaseVolume ¶
func (*MPV) TogglePause ¶
func (m *MPV) TogglePause()
Click to show internal directories.
Click to hide internal directories.