Is there any option in Player to update Playlist array
MuhammadTufailAli opened this issue · 12 comments
I am using Oplayer to display playlist. I have my fav channels in it and when i click on my fav button then my array length is increased for example before my channels array was 10 and after liking one channel it becomes 11. Now i want to update my playlist how can i do this.
This there any way in Oplyaer to do this.
player.context.playlist.changeSource([])
// will replay list from index i think
Let me try this
How i am going to use it can you please give me an example
i have array in variable called newSources
player.context.playlist.changeSourceList(sources)
code?
For testing purpose i am changing list when i click on next button
My code
const newSources = AllChannelsinonearray.slice(1);
newplayer.context.playlist.changeSourceList(newSources);
i am doing this
is it possible that playlist change without reload
may be newsource format error.
Next time, please use the template to create an issue
Format is same i am using
AllChannelsinonearray when i am first creating player playlist
and when i click next button i just slice one element from it and do this
const newSources = AllChannelsinonearray.slice(1);
newplayer.context.playlist.changeSourceList(newSources);
no, changesourcelist(list)
list just [{ src?: string duration?: string subtitles?: SubtitleSource[] thumbnails?: Thumbnails highlights?: Highlight[] }]