shiyiya / oplayer

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

Is there any way to Change currentIndex of playlist #105

Closed MuhammadTufailAli closed 11 months ago

MuhammadTufailAli commented 11 months ago

I am using Oplayer and using playlist in it. When i change channel and if the channel does not play then currentIndex Disappers. I want to chnage currentIndex manually is there any way to do this.

If channel play. image

If channel does not play. image

MuhammadTufailAli commented 11 months ago

Sorry if channel plays currentIndex appers image

shiyiya commented 11 months ago
player.context.playlist.changeSource(number)
MuhammadTufailAli commented 11 months ago

Thanks it is working Fine

MuhammadTufailAli commented 11 months ago

I have one more question newplayer.on("loadedmetadata", () => { setSelectedChannelNumberWhichWillChange((last) => { return DynamicChannel + 1; });

          // localStorage.setItem(
          //   "EpisodeNumberThatWillChange",
          //   JSON.stringify(DynamicChannel + 1)
          // );
        });

        This function is used to know it the data is load 
        Is there any function which is opposite to it which is triggred when data failed to load?
shiyiya commented 11 months ago

on 'error'