-
Notifications
You must be signed in to change notification settings - Fork 250
feat: add PTT, keyboard shortcut engine, persistent auxiliary settings #430
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
lib/KeyboardShortcuts.tsx
Outdated
const on = (event: KeyboardEvent) => { | ||
if (enable.discriminator(event)) { | ||
event.preventDefault(); | ||
if (!micEnabled) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will race. The useTrackToggle
hook also returns pending
state which is between state change and its state change trigger.
Generally explicitly muting/unmuting might be a better fit for PTT than toggling ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. And now checking the pending state before firing another toggle
action in the other cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anecdotally, I have spammed both PTT and toggle as fast as I can and don't see any unexpected behavior.
what's the idea behind customisable keyboard shortcuts, have users asked for this? 👀 |
It'd be great to get the design team involved here just on the button positioning/experience.. Ideally something like
|
some references for previous PTT ideas/drafts ultimately having a PTT component as part of the components lib would be desirable, I think. |
@lukasIO if this were part of the components lib, it would be a requirement to make the shortcuts user-configurable, IMO. We can't know what keybindings are already being used. As for why I implemented it here, I guess just because even between just a few people who wanted this feature in Meet, we had different ideas on what the command should be. @anunaym14 had specifically asked for PTT bound to a mouse button. For some that may be unexpected (especially main mouse button), others don't have a middle mouse button if using a laptop touchpad for example. I personally wanted to use Spacebar, which aligns with some other video conferencing software.
Absolutely! I know there have been ideas on how to implement it, and there is overlap with the "Agent PTT" feature which @longcw was working on (though different use-cases). I don't think that means we should scrap this work, which adds a feature I have been desperately wanting in Meet, and which we could learn from. In any case, if and when we do implement PTT at the framework level, this code should be simple to strip out, as all the logic is really contained in one component and a hook or two. |
https://www.loom.com/share/38663b9d369a43e4b73b4747c9c075cd