Skip to content

feat(core & ui): add audio volume control through arrow keys - #856

Merged
aarthificial merged 2 commits into
motion-canvas:mainfrom
Vija02:feat/audio-control
Dec 1, 2023
Merged

aarthificial merged 2 commits into
motion-canvas:mainfrom
Vija02:feat/audio-control

Conversation

@Vija02

@Vija02 Vija02 commented Nov 28, 2023

Copy link
Copy Markdown
Contributor

Adds the ability to control the volume of audio through arrow keys (up and down). This will update the volume by 10% increments.

Solves #320 partially.

There's no visible UI element yet since I think some discussion on how that should look like before implementing would be good.
However, this will at least give people the option to control the volume if they know the button to press.

@Vija02
Vija02 requested a review from aarthificial as a code owner November 28, 2023 02:48
@aarthificial

Copy link
Copy Markdown
Contributor

I'd imagine the volume slider to appear above the sound icon when hovering it:
image

Let me know if you'd be interested in implementing it in the context of this PR.

Comment thread packages/core/src/app/Player.ts Outdated
Comment thread packages/core/src/app/Player.ts Outdated
@Vija02

Vija02 commented Nov 30, 2023

Copy link
Copy Markdown
Contributor Author

Updated your changes.

UI: Hmm, the only thing stopping me would be implementing the popover component which doesn't seem to exist in the project yet. Maybe we can use something like Popper?

Let's get this PR merged and I'll make a separate PR if I get around to it.

@Vija02
Vija02 requested a review from aarthificial November 30, 2023 23:50
@aarthificial
aarthificial merged commit 8b86fd4 into motion-canvas:main Dec 1, 2023
@aarthificial

aarthificial commented Dec 1, 2023

Copy link
Copy Markdown
Contributor

Thanks for the PR!

I think Popper would be a bit of an overkill for this.
This element is more like a dropdown and since overflow is not disabled in this control bar, you should be able to easily position the slider with position: absolute:

image

(Here's a div I put inside of the volume button with position: relative)

@jmaen

jmaen commented Dec 18, 2023

Copy link
Copy Markdown
Contributor

Are you currently working on this @Vija02 ?

@Vija02

Vija02 commented Dec 18, 2023

Copy link
Copy Markdown
Contributor Author

@jmaen No I'm not

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.

3 participants