MAF.media.PlaylistEntry
This defines a media entry for the playlist in which multiple streams with different bitrates can be added. If you provide multiple streams with bitrates the fastest will be selected thats supported by the user's connection speed.
new MAF.media.PlaylistEntry()
Configs
asset : {MAF.media.Asset}
Information about the media.(title, description, poster)
bitrate : {Number}
Bitrate of the media.
streams : {Array}
Array of objects with a url and a bitrate property. When the object contains no bitrate it will inherit from the bitrate config.
Example
new MAF.media.PlaylistEntry({ bitrate: 1000, streams: [ { url: 'http://my.url/video1.mp4' }, { url: 'http://my.url/video2.mp4' } ] });
url : {String}
Media path
Methods
addURL(url, bitrate) → {MAF.media.PlaylistEntry}
Add a new stream to this media entry.
Parameters:
Name Type Argument Description url String Media path.
bitrate Number optional Bitrate of media.
Returns:
This component.
hasURL(url) → {Boolean}
Checks if this playlist entry has the url as defined by the parameter.
Parameters:
Name Type Description url String Media path.
Returns:
True if the url is already in this playlist entry.