components-js icon indicating copy to clipboard operation
components-js copied to clipboard

PTT Component

Open s-hamdananwar opened this issue 8 months ago • 0 comments

Describe the problem

I would like to have a PTT component that lets you unmute your mic source only when you hold it down, and by default is mute. This will be beneficial for the projects that are trying to integrate radio systems, where half-duplex is the norm, into the web. I also think it could be useful for Agents Playground style apps where agents can subscribe to forced mute/unmute events, alongside VAD.

Describe the proposed solution

Implement PTT using a new component and hook This new component and hook would be very similar to TrackToggle in terms of functionality, except that it would be subscribed to different React Mouse Events to mimic the holding down of the button. It should also make the audio source be published by default, since currently TrackToggle only publish audio in the first unmute event.

Alternatives considered

Creating and building a local components library after cloning this repo should make it possible to create a local PTT component and hook. But it would super beneficial it was a an pre-built component!

Importance

nice to have

Additional Information

Here is the Slack discussion I had on this topic!

s-hamdananwar avatar Jun 13 '24 17:06 s-hamdananwar