Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Player ¶
type Player interface { // Name return the current player name Name() string // Run process current URL through current player // u will be the stream URL // title will be the stream title Run(u, title string, output io.Writer) error }
Player describes an available media player application If you want to use a custom one, make sure to implement this interface
var ( QuickTimePlayer Player = &player{ name: "QuickTime Player", command: []string{"open", "-a", "quicktime player", "$url"}, registry: "", registry32: "", } IINA Player = &player{ name: "IINA", command: []string{"iina", "--no-stdin", "$url"}, registry: "", registry32: "", } VLC Player = &player{ name: "VLC", registry: "SOFTWARE\\VideoLAN\\VLC", registry32: "SOFTWARE\\WOW6432Node\\VideoLAN\\VLC", command: []string{"vlc", "$url", "--meta-title=$title"}, } MPV Player = &player{ name: "MPV", command: []string{"mpv", "$url", "--quiet", "--title=$title"}, registry: "", registry32: "", } )
func DefaultPlayer ¶
DefaultPlayer return the first media player available from $PATH or Windows registry Throw an error when no player is available
Click to show internal directories.
Click to hide internal directories.