M3u parser class to parse m3u playlist string to playlist object

Constructors

Methods

Constructors

Methods

  • Parse 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.

    Parameters

    • m3uString: string

      whole m3u playlist string

    • Optionalconfig: M3uParserConfig

      additional parsing configuration

    Returns M3uPlaylist

    parsed m3u playlist object

    const playlist = M3uParser.parse(m3uString);
    playlist.medias.forEach(media => media.location);