shiyiya/oplayer

Playlist for multiple Seasons

MuhammadTufailAli opened this issue · 4 comments

In oplay we can add playlist
The code given in documentation is

This is my code from my app
new PlaylistPlugin({
initialIndex: SelectedEpisodeNumber - 1,
autoNext: true,
autoHide: autoPlaylistClose,

              sources: SelectedSeasonArray.map((episode) => ({
                title: episode?.title,
                src: episode?.link,
                poster: episode?.poster,
              })),
            }),

But if i have more than 1 season so how can i takle that problem as in the above code i am just displaying only 1 season episode
Like i have season name game of thrones
it has 8 season so how i will display it using Oplayer??

can only lay all the episodes flat now

  sources: SeasonArray.flat().map((episode) => ({
                title: episode?.title + episode?.seasonNum,
                src: episode?.link,
                poster: episode?.poster,
              })),
            }),

i don't want to show it in one array i want to show season dropdown button where user can select season and epsiode of that season will show. I don't want to show it in one array. Can you also make playlist like this?

I haven't had time recently, you can try to implement it yourself

I did it but it is little slow that is why i was asking if there was an builed in functionality for that