<a name="Pled"></a>
Kind: global class
Param | Type | Default | Description |
---|---|---|---|
options | Object | Array.<string> |
Pled options object or array of sources | |
options.sources | Array.<string> |
Sources of m3u files. Each source is either a path to local file of a url to an http file (starting from "http://" or "https://") | |
[options.filters] | Array.<FilterFunction> |
Sequence of filters | |
[options.cachePath] | string |
Path to cache file | |
[options.cacheTime] | int |
52460601000 |
Time for cache in milliseconds. By default 5 days |
[options.forceReload] | boolean |
If cache file is specified this parameter allows to not use the cache but regenerate content (however resulting content still can be saved to the cache) |
It is possible to use Pled in pair with Express.js. Handles HTTP request.
See samples
directory for an example.
Kind: instance method of Pled
Processes play list sources and generates resulting playlist as string
Kind: instance method of Pled
Returns: Promise with a string value - content of m3u
pled.loadCache() ⇒ Promise.<CacheStatus>
Loads playlist from cache file.
Kind: instance method of Pled
- Do not modify
api.md
it will be regenerated. Modify 'tools/api.hbs' instead. - Regenerate readme:
npm run-script docs