zhw2590582 / ArtPlayer

:art: ArtPlayer.js is a modern and full featured HTML5 video player
https://artplayer.org
MIT License
2.54k stars 269 forks source link

Odd behaviour #396

Closed ahmedalashhab closed 1 year ago

ahmedalashhab commented 1 year ago

Hey, so, I tried creating a settings menu, that is able to change the provider from where i fetch my anime data but, when i do that, it either doesnt update the qualities, which i store inside an array, or it updates them, but the onclick functionality is broken.

zhw2590582 commented 1 year ago

I don't quite understand what you mean, can you give me some code? or give me a demo?

inumakieu commented 1 year ago

https://github.com/5H4D0WILA/InuStreamWebsite/blob/main/pages/watch/%5Bid%5D/%5Bname%5D.vue

This is the code that causes the issue. Its not that pretty, so hopefully you can understand whats going on. Also, the issue was caused on my project, i just asked my friend to ask about this, cuz i didnt want to create a third issue in 3 days .-.

zhw2590582 commented 1 year ago

@5H4D0WILA The code is too long and I don't know where the error occurred

inumakieu commented 1 year ago

the error occurs in line 223, thats the provider switching part

inumakieu commented 1 year ago

essentially, users have the option to choose between two providers: Gogoanime and Zoro So i added a settings menu for the two options, and try to fetch the data using the newly selected provider but, that causes the other settings menus to not update https://www.inu.watch/watch/98659/classroom-of-the-elite-ep-1 this is my website to show you what currently happens just switch to zoro, and try changing the quality/subtitles

zhw2590582 commented 1 year ago

@5H4D0WILA You can create a new issues by the way

1 2

// streamData is null caused the error
streamData = stream.value
inumakieu commented 1 year ago

i know that i can open a new issue that error is caused by the api not having the newest key, its not the issue

inumakieu commented 1 year ago

but, in short, changing the qualities array i created should update the settings, correct?