shiyiya / oplayer

:zap: Another HTM5 video player.

Home Page:https://oplayer.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Playlist for multiple Seasons

MuhammadTufailAli opened this issue · 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??

commented

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?

commented

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