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

Player needs a way to be opened after it's been closed #1195

Closed
wesbos opened this issue Oct 19, 2023 · 8 comments
Closed

Player needs a way to be opened after it's been closed #1195

wesbos opened this issue Oct 19, 2023 · 8 comments
Assignees
Milestone

Comments

@wesbos
Copy link
Collaborator

wesbos commented Oct 19, 2023

right now if you close the player, it keeps playing, but there isn't a way to get it back open unless you click play on the audio again.

Would be nice for it to minimize into just the show title / 1 line high

@RatulMaharaj
Copy link
Contributor

Can we get a hotkey? 👀

@wesbos
Copy link
Collaborator Author

wesbos commented Oct 19, 2023

Ooo yah, what should the key be?

@RatulMaharaj
Copy link
Contributor

I dunno, maybe p for player?

Here's the list of shortcuts YouTube supports. They use i as the hotkey to bring up the mini player and t for theater mode.

Hitting the spacebar to play/pause would feel pretty natural also.

@davidengebretson
Copy link

davidengebretson commented Oct 19, 2023 via email

@wesbos
Copy link
Collaborator Author

wesbos commented Oct 20, 2023

I think this issue needs to be in three parts:

  1. We need to stop the audio when users click the x
  2. We need a way to minimize the player / make a slim player
  3. we need keyboard shortcuts

@RatulMaharaj
Copy link
Contributor

RatulMaharaj commented Oct 20, 2023

I'm really keen to help out with this 🙋🏽‍♂️

I converted my hotkey PR to a draft for now - I think I could maybe tackle part 1 & 3 with some guidance on what you would want the shortcuts to be/do.

Also, perhaps a part 4 would be having some UI that shows you what shortcuts are available?

@wesbos
Copy link
Collaborator Author

wesbos commented Oct 23, 2023

Awesome, yes would love the help!

Some guidance:

  1. you'll have to expand the close() function in player.ts. probably do two things:

state.audio?.pause(); // pause it
state.current_show = null; // remove current show

  1. youll need to make a new $player.status state called "MINIMIZED", which corresponds to a slim UI of the player. Maybe just the scrubber bar and an icon to maximize it again?

  2. you did it

  3. Site wide ? keyboard shortcut that opens up a popover (see Popover API stuff scott did) to display all the possible shortcuts. Ideally this is generated from a list of the shortcuts available and not just HTML

@stolinski
Copy link
Collaborator

This has been fixed with a minimized player and closing player resetting the player.

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

No branches or pull requests

4 participants