Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rektdeckard
Copy link
Contributor

@rektdeckard rektdeckard commented May 23, 2025

  • Adds Push-To-Talk, mappable to Spacebar, Left Mouse, or Middle Mouse
  • Adds an extensible keybinding system we could use for other things in the future
  • Adds persistent storage for auxiliary user settings, akin to usePersistentUserChoices but for application-specific configuration that is outside the purview of the core components

https://www.loom.com/share/38663b9d369a43e4b73b4747c9c075cd

Copy link

vercel bot commented May 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
meet-production ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2025 4:22pm
meet-staging ❌ Failed (Inspect) May 23, 2025 4:22pm
sandbox-meet ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2025 4:22pm

const on = (event: KeyboardEvent) => {
if (enable.discriminator(event)) {
event.preventDefault();
if (!micEnabled) {
Copy link
Contributor

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 ?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@lukasIO
Copy link
Contributor

lukasIO commented May 23, 2025

what's the idea behind customisable keyboard shortcuts, have users asked for this? 👀

@davidzhao
Copy link
Collaborator

It'd be great to get the design team involved here just on the button positioning/experience.. Ideally something like

  • Create a Summon Agent button in meet, to dispatch an agent (our version)
  • once summoned, we can push to talk with an agent. so in a meeting, the agent will be passively listening.. and you push a button and it'll engage

@lukasIO
Copy link
Contributor

lukasIO commented May 23, 2025

some references for previous PTT ideas/drafts

ultimately having a PTT component as part of the components lib would be desirable, I think.

@rektdeckard
Copy link
Contributor Author

what's the idea behind customisable keyboard shortcuts, have users asked for this? 👀

@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.

ultimately having a PTT component as part of the components lib would be desirable, I think.

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.

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