TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.71k stars 3.08k forks source link

[mind] Multiple queues #5940

Open avently opened 3 years ago

avently commented 3 years ago

Looks like many people have a use-cases related to playing music in the background player and watching videos in the main player simultaneously. To make this happen some design and architectural changes should be made. The question is how the changes should look like? In this thread I want to discuss possible solutions to this problem.

Here I want you to focus on the solution, not on the problem and how you feel about it. I'm asking @opusforlife2 for help with removing any non-constructive comments because without the moderation we will get a useless thread that nobody want to read or write to. Think of it as a brainstorming thread.

I'm not saying that I will write a code for the solution we find because I currently have no time even for writing this text. But it will make a strong understanding for those who has the time and skills to make this feature alive.

I thought about the solution for about a week or so. Today I made a mind map that shows in details of how I see the solution. I'm using XMind app for Android. You can download it for free and open attached file, then edit and re-upload your ideas with PNG and .xmind files. Make sure it's easy to understand, that shouldn't be a poem. Try to recreate current UI and show the changes that should be made.

The problem: Now you can switch between players but can't play something in background, popup, main players at the same time. You can't add, for example, music playlist and watch unrelated videos in the main player at the same time.

The solution I propose: Main player and channel playlist pages_210328_144040

XMind file (unzip it first, GitHub disallows to upload it without an archive) NewPipe-architecture-210328144045.zip

Your turn.

MapleWheels commented 3 years ago

Hi,

I can see a slight issue with how the queue is treated when only one queue is present. Mainly around people playing a video in Main Player when they only had a background (music?) queue present.

I'll draw/post an updated user flow diagram tomorrow.

Edit: I had a ton of work piled on me this week. Sorry, but I'll need to delay my submissions.

opusforlife2 commented 3 years ago

@avently I've currently taken a backseat from moderation. @mhmdanas is the lead moderator right now, and other team members help here and there.

SameenAhnaf commented 3 years ago

Queues should not be only on the basis of player. Let the users keep queues as many as they want. Keeping multiple media player notification bars isn't actually that bad. Users will have the flexibility to switch to any queue at any moment.

MapleWheels commented 3 years ago

@avently Sorry, I've been (and still am) beyond busy (client+management just added more feature requirements with not enough time).

Queues should not be only on the basis of player. Let the users keep queues as many as they want. Keeping multiple media player notification bars isn't actually that bad. Users will have the flexibility to switch to any queue at any moment.

No, this gets very messy for both the users and the devs. Avently's user story is actually pretty well done. The only issue I see is that we only need 2 queues instead of three. The intention behind these queues is "foreground" versus "background". I don't personally see the need for the Main Player and the Popup Player to have separate queues as they're both active attention queues (you won't be consuming the popup and main player content differently from each other, both serve the same functional purpose).

You need to keep in mind that this app will be used outside of Android smartphones with touch navigation (such as 'smart devices') and having several queues can become a context switching nightmare.

Sorry but I don't have the time to do an XMind-Map user story from my phone, If you can convert the story to a desktop equivalent app then I'm more than happy to use it.

Here are my suggestions: Let us define two dynamic queues; Let us say that "Main Queue" is a foreground queue that is shared between the popup and the main player. Let us say that "Background Queue" is a background queue that is used only by the background player.

For the top 3 user flows as (left, center, right),

The user flow for using the 'Background Queue' is an explicit action. The pre-unified UI's option of "Play in Background" or "Enqueue in Background" (usually via the long press popup modal). Any direct selection of the "Play" button on any content will automatically default to the 'Main Queue'. This will also be true for opening links from external programs.

ALTERNATIVELY: If you wish to keep the 'Popup Queue' separate, the only change would have to be CENTER: Instead, the CENTER user flow should only check if 'Popup Queue' exists and move the 'Popup Queue' to Main. The `Background Queue' should not be touched. Usage of the 'Background Queue' should require an explicit selection of "Play in Background" or "Enqueue in Background" and in this case, it should not affect the 'Main Queue'.


"So how does the user switch the Background Queue to the Main/Popup Queue?" The same as in pre-unified as follows:

  1. The user navigates to the background queue UI/View.
  2. The user selects the context menu (three vertical "..." button) in the top-right corner.
  3. The user selects "Switch to Main player".
  4. The app checks [IF 'Main Queue' IS Empty] A. ['Main Queue' IS NOT Empty] A1. The user is presented with a popup modal with three options: A. "Replace Main Queue" B. "Append to Main Queue" C. "Cancel" A1A1: The 'Main Queue' is replaced by the 'Background Queue' and the 'Background Queue' is now empty. A1A2. Goto "5". A1B1. The 'Main Queue' has the contents of the 'Background Queue' appended to it and the 'Background Queue' is now empty. A1B2. Goto "5". A1C--END. No action is taken by the app and the popup modal closes. User story/flow is completed. B. ['Main Queue' IS Empty] B1. The (empty) 'Main Queue' is replaced by the 'Background Queue' and the 'Background Queue' is now empty. B2. Goto "5".
  5. The UI switches to the player for the 'Main Queue' and begins playing immediately.

I hope this helps.

avently commented 3 years ago

Guys, I said about mind map for a reason. When you adapt your ideas to mind map you see how one thing works with the whole architecture. Your idea will be understandable and clear. This way like you say here is kind of non-clear and not really useful, I don't even read all this because when I start reading i see such complex solutions that will never work or be implemented in real life because they are not suitable for anything expect you one use-case.

So, please, use mind map.

MapleWheels commented 3 years ago

Guys, I said about mind map for a reason. When you adapt your ideas to mind map you see how one thing works with the whole architecture. Your idea will be understandable and clear. This way like you say here is kind of non-clear and not really useful, I don't even read all this because when I start reading i see such complex solutions that will never work or be implemented in real life because they are not suitable for anything expect you one use-case.

So, please, use mind map.

It appears as though the file is corrupted on my end; could you verify that the Github zipped file isn't? And yes, I tried it both zipped and unzipped (I know you said unzipped). image

avently commented 3 years ago

@MapleWheels I downloaded the archive, extracted the .xmind file and successfully opened it in Xmind on Android.

avently commented 3 years ago

Sorry for missing the screenshots. The mind map seems to be too big while taking screenshot on my phone.

When you tap Share button you have a choice PNG. This is what you need to make an image like I did

MapleWheels commented 3 years ago

@MapleWheels I downloaded the archive, extracted the .xmind file and successfully opened it in Xmind on Android.

I'm attempting to open it via the Desktop app with no dice.

SameenAhnaf commented 3 years ago
Replace X icon on top left corner of main player with multiple queues' drop down menu. If main player is active, this is how the buttons should look. Buttons will change accordingly if background or popup player is active in respective cases. Main Video list on queue Clear queue
Background* Switch current queue to Background Enqueue background queue on current player
Popup* Switch current queue to popup Enqueue popup queue on current player

*Button to resume queue from last played video on these queues.

Player name should be shown on the right of icons in first column. Button names in second and third column should be hidden.

Auto-play, External player and Kodi options should be removed from settings. Video title, resolution and captions drop-down menu should be shown on top of this context menu.

Short press on any video thumbnail should show following menu. For audio-only platforms, hide second and fourth columns and play media on background.

Share external URL External Audio Cast to Kodi External Video Comments
Share Enqueue on Background Queue on Kodi Enqueue Next on Popup Add to Playlist
Share with last app Enqueue on Background Enqueue on Main Enqueue on Popup Mark as Played
Open in Browser Enqueue Next on Background Enqueue Next on Main Enqueue Next on Popup Download

Replace Enqueue Next on Player by Pre-queue on Player if the selected player isn't active. Replace Download by Notify option in case of upcoming videos.

Related: TeamNewPipe/NewPipe#1788, TeamNewPipe/NewPipe#7417, #3642, #5591, #4779, #6500, https://github.com/TeamNewPipe/NewPipe/issues/6787, https://github.com/TeamNewPipe/NewPipe/issues/3448 and #6347

avently commented 3 years ago

@SameenAhnaf thank you for the ideas. Looks like I don't like most of them, but maybe other people will find them interesting.

avently commented 3 years ago

I'll add a feedback on all of the suggestions later

TBN-MapleWheels commented 2 years ago

So, since the fork of NewPipe that supported the split background player from 0.19.8 is now unmaintained, I am shamelessly HARD necroing this issue :)

Also, I want to reframe this issue as; people just want the ability to open a link/video without modifying the existing queue. People just want the functional equivalent of Browser Tabs for mobile with external links defaulting to "Open in New Tab" behaviour.