Skip to content

Commit

Permalink
Improvements to spatial, needs robust conn and stream handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
digisomni committed Jun 7, 2024
1 parent 20563cd commit 5a74498
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/modules/scene/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@ export class AudioManager {
* @param pStream stream from user that should go to the domain
*/
public static setAudioToDomain(pStream: Nullable<MediaStream>): void {
const mixer = DomainManager.ActiveDomain?.AudioClient?.Mixer;
if (DomainManager.ActiveDomain?.AudioClient?.clientState === AssignmentClientState.CONNECTED && mixer) {
mixer.audioInput = pStream as MediaStream | null;
AudioManager.setDomainAudioMuted(mixer.inputMuted);
void AudioManager.setDomainAudioPlayPause(true);
}
// const mixer = DomainManager.ActiveDomain?.AudioClient?.Mixer;
// if (DomainManager.ActiveDomain?.AudioClient?.clientState === AssignmentClientState.CONNECTED && mixer) {
// mixer.audioInput = pStream as MediaStream | null;
// AudioManager.setDomainAudioMuted(mixer.inputMuted);
// void AudioManager.setDomainAudioPlayPause(true);
// }

// TODO:
if (!Client.worldConnected()) {
Expand All @@ -251,7 +251,7 @@ export class AudioManager {
}

if (pStream) {
Client.Agent.Media.updateLocalStream({
void Client.Agent.Media.updateLocalStream({
newStream: pStream,
kind: "audio"
});
Expand Down
2 changes: 1 addition & 1 deletion src/vircadia-world

0 comments on commit 5a74498

Please sign in to comment.