players

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const UserRequestID_media_title uint64 = 20000001

Variables

This section is empty.

Functions

This section is empty.

Types

type MpvPlayer

type MpvPlayer struct {
	// contains filtered or unexported fields
}

MpvPlayer is a wrapper around gompv implementing the RadioPlayer interface

func NewMpv

func NewMpv() *MpvPlayer

func (*MpvPlayer) Close

func (m *MpvPlayer) Close()

Close the MpvPlayer

func (*MpvPlayer) DecVolume

func (m *MpvPlayer) DecVolume()

Decrease volume by 5%

func (*MpvPlayer) Events

func (m *MpvPlayer) Events() chan mpv.Event

func (*MpvPlayer) IncVolume

func (m *MpvPlayer) IncVolume()

IncVolume increase volume by 5%

func (*MpvPlayer) Init

func (m *MpvPlayer) Init() (err error)

func (*MpvPlayer) IsMute

func (m *MpvPlayer) IsMute() bool

IsMute return mute state

func (*MpvPlayer) Mute

func (m *MpvPlayer) Mute()

Mute set the mute state to true

func (*MpvPlayer) NowPlaying

func (m *MpvPlayer) NowPlaying() string

NowPlaying return a the name of the track playin

func (*MpvPlayer) Play

func (m *MpvPlayer) Play(stream_url string)

Play stream_url

func (*MpvPlayer) SetVolume

func (m *MpvPlayer) SetVolume(volume int)

SetVolume set the volume to the desired level

func (*MpvPlayer) ToggleMute

func (m *MpvPlayer) ToggleMute()

ToggleMute toggle mute state

func (*MpvPlayer) Unmute

func (m *MpvPlayer) Unmute()

Unmute set the mute state to false

func (*MpvPlayer) Volume

func (m *MpvPlayer) Volume() int

Return the volume in percentage

Jump to

Keyboard shortcuts

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