Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMoreMedia = errors.New("no more media in the list")
View Source
var ErrPlayerNotInitialized = errors.New("player wasn't initialized")
View Source
var VideoFiles map[string]struct{} = map[string]struct{}{
".avi": {},
".mp4": {},
".mkv": {},
}
Functions ¶
This section is empty.
Types ¶
type MediaList ¶
type MediaList struct { SortStrategy MediaListSortStrategy // contains filtered or unexported fields }
func FromFolder ¶
func NewMediaList ¶
func NewMediaList(list []string, sortStrat MediaListSortStrategy) (*MediaList, error)
type MediaListSortStrategy ¶
type MediaListSortStrategy interface {
Sort([]string)
}
type NullPlayer ¶
type NullPlayer struct {
// contains filtered or unexported fields
}
NullPlayer advances the current item in the MediaList every 30 minutes. It (poorly) mimics the list of media being watched, as if it was on another channel.
func (*NullPlayer) Current ¶
func (n *NullPlayer) Current() string
func (*NullPlayer) Init ¶
func (n *NullPlayer) Init() error
func (*NullPlayer) Next ¶
func (n *NullPlayer) Next() string
func (*NullPlayer) Play ¶
func (n *NullPlayer) Play(list *MediaList) error
func (*NullPlayer) PlayNext ¶
func (n *NullPlayer) PlayNext() error
func (*NullPlayer) Shutdown ¶
func (n *NullPlayer) Shutdown() error
type SortStratRandom ¶
type SortStratRandom struct{}
func (SortStratRandom) Sort ¶
func (s SortStratRandom) Sort(list []string)
Click to show internal directories.
Click to hide internal directories.