Documentation
¶
Index ¶
- Constants
- Variables
- type M3UEntries
- type M3UEntry
- type M3UPlaylist
- func (playlist *M3UPlaylist) EntriesString() string
- func (playlist *M3UPlaylist) GetEntries() M3UEntries
- func (playlist *M3UPlaylist) GetVersion() int
- func (playlist *M3UPlaylist) RemoveEntryByTvgTag(tag, value string)
- func (playlist *M3UPlaylist) SearchEntryByTitle(title string) *M3UEntry
- func (playlist *M3UPlaylist) SearchEntryByTvgTag(tag, value string) *M3UEntry
- func (playlist *M3UPlaylist) SearchEntryByURI(uri string) *M3UEntry
- func (playlist *M3UPlaylist) SearchEntryIndexByTvgTag(tag, value string) int
- func (playlist *M3UPlaylist) StreamCount() int
- func (playlist *M3UPlaylist) String() string
- func (playlist *M3UPlaylist) WriteTo(writer io.Writer) (int64, error)
- type M3UTag
- type M3UTags
- type M3UTvgTag
- type M3UTvgTags
Constants ¶
View Source
const (
// M3U8Version3 represents version 3 of the M3U8 format.
M3U8Version3 = 3
)
Variables ¶
View Source
var (
M3U8Directives = []string{
"EXTM3U",
"EXTINF",
"PLAYLIST",
"EXTGRP",
"EXTALB",
"EXTART",
"EXTGENRE",
"EXTM3A",
"EXTBYT",
"EXTBIN",
"EXTENC",
"EXTIMG",
"EXT-X-START",
"EXT-X-INDEPENDENT-SEGMENTS",
"EXT-X-PLAYLIST-TYPE",
"EXT-X-TARGETDURATION",
"EXT-X-VERSION",
"EXT-X-MEDIA-SEQUENCE",
"EXT-X-MEDIA",
"EXT-X-STREAM-INF",
"EXT-X-BYTERANGE",
"EXT-X-DISCONTINUITY",
"EXT-X-DISCONTINUITY-SEQUENCE",
"EXT-X-GAP",
"EXT-X-KEY",
"EXT-X-MAP",
"EXT-X-PROGRAM-DATE-TIME",
"EXT-X-DATERANGE",
"EXT-X-I-FRAMES-ONLY",
"EXT-X-SESSION-DATA",
"EXT-X-SESSION-KEY",
"EXT-X-ENDLIST",
"EXTVLCOPT",
"KODIPROP",
"M3UPROXYHEADER",
}
)
Functions ¶
This section is empty.
Types ¶
type M3UEntries ¶ added in v0.0.3
type M3UEntries []M3UEntry
func (M3UEntries) RemoveByTvgTag ¶ added in v0.0.3
func (entries M3UEntries) RemoveByTvgTag(tag string, value string)
func (M3UEntries) SearchByTvgTag ¶ added in v0.0.7
func (entries M3UEntries) SearchByTvgTag(tag string, value string) *M3UEntry
func (M3UEntries) SearchIndexByTvgTag ¶ added in v0.0.7
func (entries M3UEntries) SearchIndexByTvgTag(tag string, value string) int
type M3UEntry ¶
type M3UEntry struct {
URI string `json:"uri"` // The URI of the media.
Duration int `json:"duration"` // The duration of the media in seconds (if available).
Title string `json:"title"` // The title of the media (if available).
Tags M3UTags `json:"tags"` // Additional tags associated with the entry.
TVGTags M3UTvgTags `json:"tvg_tags"` // Additional tags associated with the entry.
}
M3UEntry represents a single entry in the M3U file.
func (*M3UEntry) RemoveTags ¶ added in v0.0.12
func (*M3UEntry) SearchTags ¶ added in v0.0.7
type M3UPlaylist ¶
type M3UPlaylist struct {
Version int // The version of the M3U (EXTM3U).
Entries M3UEntries // The list of media entries in the playlist.
Tags M3UTags // Additional tags associated with the entry.
Type string // The type of the media (if available).
}
M3UPlaylist represents the parsed M3U playlist.
func DecodeFromReader ¶ added in v0.0.23
func DecodeFromReader(buf io.Reader) (*M3UPlaylist, error)
func ParseM3UFile ¶
func ParseM3UFile(filePath string) (*M3UPlaylist, error)
func (*M3UPlaylist) EntriesString ¶ added in v0.0.3
func (playlist *M3UPlaylist) EntriesString() string
func (*M3UPlaylist) GetEntries ¶
func (playlist *M3UPlaylist) GetEntries() M3UEntries
func (*M3UPlaylist) GetVersion ¶
func (playlist *M3UPlaylist) GetVersion() int
func (*M3UPlaylist) RemoveEntryByTvgTag ¶ added in v0.0.3
func (playlist *M3UPlaylist) RemoveEntryByTvgTag(tag, value string)
func (*M3UPlaylist) SearchEntryByTitle ¶ added in v0.0.7
func (playlist *M3UPlaylist) SearchEntryByTitle(title string) *M3UEntry
func (*M3UPlaylist) SearchEntryByTvgTag ¶ added in v0.0.7
func (playlist *M3UPlaylist) SearchEntryByTvgTag(tag, value string) *M3UEntry
func (*M3UPlaylist) SearchEntryByURI ¶ added in v0.0.7
func (playlist *M3UPlaylist) SearchEntryByURI(uri string) *M3UEntry
func (*M3UPlaylist) SearchEntryIndexByTvgTag ¶ added in v0.0.7
func (playlist *M3UPlaylist) SearchEntryIndexByTvgTag(tag, value string) int
func (*M3UPlaylist) StreamCount ¶ added in v0.0.7
func (playlist *M3UPlaylist) StreamCount() int
func (*M3UPlaylist) String ¶
func (playlist *M3UPlaylist) String() string
type M3UTvgTags ¶ added in v0.0.3
type M3UTvgTags []M3UTvgTag
func ParseTVGTags ¶ added in v0.0.3
func ParseTVGTags(data string) M3UTvgTags
func (M3UTvgTags) GetValue ¶ added in v0.0.3
func (tags M3UTvgTags) GetValue(tag string) string
func (M3UTvgTags) String ¶ added in v0.0.3
func (tags M3UTvgTags) String() string
Click to show internal directories.
Click to hide internal directories.