-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add experimental option to pipe attached audio tracks through webaudio API #446
Conversation
🦋 Changeset detectedLatest commit: 405f613 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
lg, I'll figure out a way to make testing audio a bit easier via the CLI.
src/room/track/RemoteAudioTrack.ts
Outdated
setAudioContext(audioContext: AudioContext) { | ||
this.audioContext = audioContext; | ||
if (this.attachedElements.length > 0) { | ||
this.setupWebAudio(audioContext, this.attachedElements[0]); |
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.
if attached to multiple elements, do we only need to handle the first one?
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.
or would it be a limitation that it only handles a single audio element?
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.
for webaaudio we only need one element, as we're actually not interested in the element, but rather in the mediastream attached with it. we wouldn't want to pipe the same audio track multiple times into web audio
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.
but just realised detach logic is still missing...
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.
good call!
…o API (livekit#446) * add option to pipe attached audio tracks through webaudio api * use logger * detach logic * reconnect if still attached * set nodes to undefined * cleanup * add method to set additional audionodes that plugin between track and destination * changeset * only reconnect webaudio if needed
…o API (livekit#446) * add option to pipe attached audio tracks through webaudio api * use logger * detach logic * reconnect if still attached * set nodes to undefined * cleanup * add method to set additional audionodes that plugin between track and destination * changeset * only reconnect webaudio if needed
…o API (livekit#446) * add option to pipe attached audio tracks through webaudio api * use logger * detach logic * reconnect if still attached * set nodes to undefined * cleanup * add method to set additional audionodes that plugin between track and destination * changeset * only reconnect webaudio if needed
No description provided.