player.playlist.next(); Play next itemplayer.playlist.previous(); Play previous itemplayer.playlist.first(); Play first itemplayer.playlist.last(); Play last itemplayer.playlist.currentItem(id); Play item by playlist idplayer.playlist.insert(mediaItem); Appen new media item to the end of the playlistplayer.playlist.insertBefore(mediaItem, id); Insert new media item before existing media item Idplayer.playlist.insertAfter(mediaItem, id); Insert new media item after existing media item Idplayer.playlist.remove(id); Remove playlist item by Idplayer.playlist.new(New_playlist); Load new playlist programmatically
var mediaItem = {src://www.domain.com/video.mp4, type:"video/mp4", thumb: //www.domain.com/thumb.jpg", title:"media title", duration: "03:20"}
var mediaItem={sources:[{ src:"//www.domain.com/video_720.mp4",type:"video/mp4",label:"720p",res:"720"},{ src:"//www.domain.com/video_360.mp4",type:"video/mp4",label:"360p",res:"360",default:1},{ src:"//www.domain.com/video_240.mp4",type:"video/mp4",label:"240p",res:"240"}],thumb:"www.domain.com/thumb.jpg",,title:'media title',duration:"03:20" }
var mediaItem = {src://www.domain.com/video.m3u8, type:"application/x-mpegURL",tracks:[{ kind:"captions",src:"//domain.com/en.vtt",srclang:"en",label:"English" },{ kind:"captions",src:"//domain.com/de.vtt",srclang:"de",label:"Deutsch" },{ kind:"chapters",src:"//domain.com/chapters.vtt",srclang:"en" }],thumb: //www.domain.com/thumb.jpg",title:"media title",duration: "03:20",poster: "//domain.com/poster.jpg",metaDescription: "media description"}
track:{ kind:"chapters",src:"//domain.com/chapters.vtt",srclang:"en" }