Documentation ¶
Overview ¶
Package videoproviders is a telly internal package to provide video stream information.
Index ¶
- Constants
- type Category
- type Channel
- type ChannelType
- type Configuration
- type M3U
- func (m *M3U) Categories() ([]Category, error)
- func (m *M3U) Channels() ([]Channel, error)
- func (m *M3U) Configuration() Configuration
- func (m *M3U) Formats() ([]string, error)
- func (m *M3U) Name() string
- func (m *M3U) Refresh() error
- func (m *M3U) StreamURL(streamID int, wantedFormat string) (string, error)
- type VideoProvider
- type XtreamCodes
- func (x *XtreamCodes) Categories() ([]Category, error)
- func (x *XtreamCodes) Channels() ([]Channel, error)
- func (x *XtreamCodes) Configuration() Configuration
- func (x *XtreamCodes) Formats() ([]string, error)
- func (x *XtreamCodes) Name() string
- func (x *XtreamCodes) Refresh() error
- func (x *XtreamCodes) StreamURL(streamID int, wantedFormat string) (string, error)
Constants ¶
const ( // LiveStream is the constant describing a live stream. LiveStream ChannelType = "live" // VODStream is the constant describing a video on demand stream. VODStream = "vod" // SeriesStream is the constant describing a TV series stream. SeriesStream = "series" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Name string StreamID int Logo string Type ChannelType Category string EPGID string // contains filtered or unexported fields }
Channel describes a channel available in the providers lineup with necessary pieces parsed into fields.
type ChannelType ¶
type ChannelType string
ChannelType is used for enumerating the ChannelType field in Channel.
type Configuration ¶
type Configuration struct { Name string `json:"-"` Provider string // Only used for Xtream provider Username string Password string BaseURL string // Only used for M3U provider M3UURL string NameKey string LogoKey string CategoryKey string EPGIDKey string }
Configuration is the basic configuration struct for videoproviders with generic values for specific providers.
func (*Configuration) GetProvider ¶
func (i *Configuration) GetProvider() (VideoProvider, error)
GetProvider returns an initialized VideoProvider for the Configuration.
type M3U ¶
type M3U struct { BaseConfig Configuration Playlist *m3uplus.Playlist // contains filtered or unexported fields }
M3U is a VideoProvider supporting M3U files.
func (*M3U) Categories ¶
Categories returns a slice of Category that the provider has available.
func (*M3U) Configuration ¶
func (m *M3U) Configuration() Configuration
Configuration returns the base configuration backing the provider
type VideoProvider ¶
type VideoProvider interface { Name() string Categories() ([]Category, error) Formats() ([]string, error) Channels() ([]Channel, error) StreamURL(streamID int, wantedFormat string) (string, error) Refresh() error Configuration() Configuration }
VideoProvider describes a IPTV provider configuration.
type XtreamCodes ¶
type XtreamCodes struct { BaseConfig Configuration // contains filtered or unexported fields }
XtreamCodes is a VideoProvider supporting Xtream-Codes IPTV servers.
func (*XtreamCodes) Categories ¶
func (x *XtreamCodes) Categories() ([]Category, error)
Categories returns a slice of Category that the provider has available.
func (*XtreamCodes) Channels ¶
func (x *XtreamCodes) Channels() ([]Channel, error)
Channels returns a slice of Channel that the provider has available.
func (*XtreamCodes) Configuration ¶
func (x *XtreamCodes) Configuration() Configuration
Configuration returns the base configuration backing the provider
func (*XtreamCodes) Formats ¶
func (x *XtreamCodes) Formats() ([]string, error)
Formats returns a slice of strings containing the valid video formats.
func (*XtreamCodes) Name ¶
func (x *XtreamCodes) Name() string
Name returns the name of the VideoProvider.
func (*XtreamCodes) Refresh ¶
func (x *XtreamCodes) Refresh() error
Refresh causes the provider to request the latest information.
func (*XtreamCodes) StreamURL ¶
func (x *XtreamCodes) StreamURL(streamID int, wantedFormat string) (string, error)
StreamURL returns a fully formed URL to a video stream for the given streamID and wantedFormat. Refresh causes the provider to request the latest information. Configuration returns the base configuration backing the provider