M3u playlist object

Hierarchy

  • M3uPlaylist

Constructors

Properties

Accessors

Methods

Constructors

Properties

attributes: M3uAttributes = ...

Attributes of of the EXTM3U tag. Default value is empty attributes object.

customData: M3uCustomData[] = []

Unknown directives, that belong to the whole playlist

medias: M3uMedia[] = []

M3u media objects

Example

const playlist = new M3uPlaylist();
const media1 = new M3uMedia('http://my-stream-ulr.com/playlist.m3u8');
playlist.medias.push(media1);
title: string = ''

Title of playlist

Example

code

const playlist = new M3uPlaylist();
playlist.title = 'Test playlist';

Example

example output in final m3u string

#PLAYLIST:Test TV

Accessors

  • get urlTvg(): undefined | string
  • Get url-tvg url

    Returns

    url-tvg url

    Deprecated

    The method should not be used, use playlist.attributes['url-tvg'] instead

    Returns undefined | string

  • set urlTvg(urlTvg: undefined | string): void
  • Set url-tvg url

    Deprecated

    The method should not be used, use playlist.attributes['url-tvg'] instead

    Parameters

    • urlTvg: undefined | string

      url-tvg url

    Returns void

Methods

  • Get m3u string method to get m3u playlist string of current playlist object

    Returns

    m3u playlist string

    Returns string

Generated using TypeDoc