remixer-dec / YouTubePlaylistRandomizer

Randomize YouTube playlists, shuffle the videos, avoid repetitions, save progress.
https://remixer-dec.github.io/YouTubePlaylistRandomizer/
Other
9 stars 3 forks source link

ads removal + auto next #1

Closed NazgulCoder closed 2 years ago

NazgulCoder commented 2 years ago

Hi,

thank you for the great release, i wanted to ask you something, is it normal that i don't see the advertisements on the videos? (I disabled Adblockers)

How did you manage to do that?

And last thing, i noticed that when you let the playlist go, it uses the youtube shuffler, while to keep going with your shuffle tool you have to manually click the next song button, is there a way you can automatize this for example that it gets pressed 2 seconds before the video is over?

Keep up the great job

remixer-dec commented 2 years ago

Hi. Not sure about ads, maybe this behavior happens in iframes or due to third party cookie policies, anyways it's not intended / not coded in any way on project's side.

Second one seems to be a bug on Youtube's side.

    switch (event.data) {
        case YT.PlayerState.ENDED:
            app.playNextVideo()

This code should play the next video, but the event with state 0 is never fired. I'm pretty sure it was not like this when I made this project. I'll report it to google and hopefully they'll fix it.

remixer-dec commented 2 years ago

https://issuetracker.google.com/issues/194595380

Looks like this bug already exists and they just ignore it

remixer-dec commented 2 years ago

I'll file another report since they probably do not receive notifications on comments on closed reports

NazgulCoder commented 2 years ago

hopefully they'll do something ( i don't think so but let's hope xD) many thanks for your assistance man :) star is deserved

remixer-dec commented 2 years ago

@NazgulCoder Hello, devs from Google said it's intended behavior, but also suggested a workaround. I implemented it in the last commit. Please try if it works.

NazgulCoder commented 2 years ago

@remixer-dec hey yes i just had some spare time to update the javascript file and try it with your "fix" and works perfectly now, many thanks for your help :)

remixer-dec commented 2 years ago

@NazgulCoder alright, thanks for testing! Be aware also that there is a hard limit on 200 max.videos in a playlist, which is also "intended behavior" according to google.