Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: option to autoplay videos in playlist #4829

Merged
merged 7 commits into from
Oct 5, 2023

Conversation

FineFindus
Copy link
Contributor

Currently, playing a playlist is only possible when autoplay is enabled.
This pr changes this and autoplays all videos in a playlist without autoplay being enabled.

@IndusAryan
Copy link
Contributor

whats point of autoplay preference then?

@FineFindus
Copy link
Contributor Author

Autoplay plays the next video after the current one finishes. This is done regardless if the watched video was just a single video or part of a playlist.
Enabling autoplay will still continue to play the next video, this only affects the behavior if the user is watching a playlist.

@Bnyro
Copy link
Member

Bnyro commented Sep 21, 2023

The same behavior can be achieved by disabling "Insert related items to queue" and enabling autoplay.

I don't see why we should automatically play the next videos even though the user explicitly disabled it (Autoplay is enabled by default).

@FineFindus
Copy link
Contributor Author

I would consider myself a fairly experienced user (I both use the app a lot and have contributed to it), and yet I had no idea that this combination of settings achieves the desired behavior. How is a new and inexperienced user supposed to discover this?
They might just disable autoplay because they don't like it, and later try to play a playlist, but it only plays one video at a time. From their experience, the application is obviously broken because it breaks with already established concepts in other applications (e.g. playlists in YouTube play all videos even if autoplay is disabled).

Also, I think the user group that clicks on a playlist and expects it to play only one video at a time is pretty small or nonexistent.

@Silther
Copy link
Contributor

Silther commented Sep 21, 2023

You could make this change optional.
If you can't disable autoplay anymore, it woudn't be very useful for most people.
See #1810.

@Bnyro
Copy link
Member

Bnyro commented Sep 24, 2023

I would consider myself a fairly experienced user (I both use the app a lot and have contributed to it), and yet I had no idea that this combination of settings achieves the desired behavior. How is a new and inexperienced user supposed to discover this?

I don't expect any new user to discover this option, however:

  • we have an open issue that focuses on improving the organization of the settings
  • the user can temporarily enable autoplay

I'd be okay with adding an option to autoplay playlists.

Nevertheless this should also affect the background mode / audio only player too.

@FineFindus
Copy link
Contributor Author

Added a setting for it and changed the code in OnlinePlayerService (I this one is responsible for background play?).
Not sure how to support the audio only player, as it doesn't even support autoplay.

@IndusAryan

This comment has been minimized.

@Bnyro
Copy link
Member

Bnyro commented Sep 25, 2023

Added a setting for it and changed the code in OnlinePlayerService (I this one is responsible for background play?). Not sure how to support the audio only player, as it doesn't even support autoplay.

Just make PlayerHelper.autoPlay a private var and replace it where the compilation fails.

The background / audio only mode does support autoplay though.

@Bnyro
Copy link
Member

Bnyro commented Sep 25, 2023

Bnyro you added thousand lines for this 😂

photo_2023-09-25_16-14-08

That's unrelated to this PR, and in fact it's mainly useful for the banner of a channel, not its avatar.

@IndusAryan

This comment was marked as resolved.

@FineFindus
Copy link
Contributor Author

I already replaced it everywhere, except for the autoplay switches themselves.

The background / audio only mode does support autoplay though.

Hmm, odd, I can't get it to work

@Bnyro Bnyro changed the title fix(playlist): autoplay videos in playlist feat: option to autoplay videos in playlist Oct 5, 2023
@Bnyro Bnyro merged commit 33d25fa into libre-tube:master Oct 5, 2023
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants