shiyiya / oplayer

:zap: Another HTM5 video player.
https://oplayer.vercel.app
MIT License
147 stars 19 forks source link

Playlist for multiple Seasons #94

Closed MuhammadTufailAli closed 1 year ago

MuhammadTufailAli commented 1 year ago

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??

shiyiya commented 1 year ago

can only lay all the episodes flat now

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

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?

shiyiya commented 1 year ago

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

MuhammadTufailAli commented 1 year ago

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