Static
Private
getPrivate
Get m3u attributes object from attributes string
attributes object e.g. {"tvg-id": "", "group-title": ""}
e.g. 'tvg-id="" group-title=""'
Static
Private
getPrivate
Get playlist returns m3u playlist object parsed from m3u string lines
parsed m3u playlist object
m3u string lines
whole custom directive data mapping configuration
Static
Private
isStatic
Private
isStatic
parseParse is static method to parse m3u playlist string into m3u playlist object. Playlist need to contain #EXTM3U directive on first line. All lines are trimmed and blank ones are removed.
parsed m3u playlist object
const playlist = M3uParser.parse(m3uString);
playlist.medias.forEach(media => media.location);
whole m3u playlist string
Optional
config: M3uParserConfigadditional parsing configuration
Static
Private
processPrivate
Process custom unknown directive and add it into playlist or media object, based on mapping configuration
m3u playlist object processed until now
actual m3u media object
track information, whole part of string after directive and semicolon
unknown directive e.g. #EXT-CUSTOM
whole custom directive data mapping configuration
Static
Private
processPrivate
Process directive method detects directive on line and call proper method to another processing
actual line of m3u playlist string e.g. '#EXTINF:-1 tvg-id="" group-title="",Tv Name'
whole custom directive data mapping configuration
m3u playlist object processed until now
actual m3u media object
Static
Private
processPrivate
Process attributes in #EXTM3U line
first line of m3u playlist string e.g. '#EXTM3U url-tvg="http://example.com/tvg.xml"'
m3u playlist object processed until now
Static
Private
processPrivate
Process media method parse trackInformation and fill media with parsed info
media substring of m3u string line e.g. '-1 tvg-id="" group-title="",Tv Name'
actual m3u media object
Generated using TypeDoc
M3u parser class to parse m3u playlist string to playlist object