@newgameplusinc/odyssey-audio-video-sdk-dev 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +15 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -394,13 +394,21 @@ class OdysseySpatialComms extends EventManager_1.EventManager {
|
|
|
394
394
|
participant.consumers.set(consumer.id, consumer);
|
|
395
395
|
if (track.kind === "audio") {
|
|
396
396
|
participant.audioTrack = track;
|
|
397
|
-
|
|
398
|
-
//
|
|
399
|
-
|
|
400
|
-
)
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
397
|
+
// CRITICAL: Do NOT setup spatial audio for local participant (yourself)
|
|
398
|
+
// This prevents hearing your own microphone (loopback)
|
|
399
|
+
const isLocalParticipant = participant.participantId === this.localParticipant?.participantId;
|
|
400
|
+
if (isLocalParticipant) {
|
|
401
|
+
console.log("🔇 SDK: Skipping spatial audio setup for LOCAL participant (yourself) - prevents loopback", participant.participantId);
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
console.log("🎧 SDK: Setting up spatial audio for REMOTE participant", participant.participantId);
|
|
405
|
+
// Setup spatial audio with full 3D positioning
|
|
406
|
+
this.spatialAudioManager.setupSpatialAudioForParticipant(participant.participantId, track, false // Enable spatial audio
|
|
407
|
+
);
|
|
408
|
+
// Update spatial audio position for this participant
|
|
409
|
+
this.spatialAudioManager.updateSpatialAudio(participant.participantId, data.position);
|
|
410
|
+
console.log("📍 SDK: Spatial audio position set:", data.position);
|
|
411
|
+
}
|
|
404
412
|
}
|
|
405
413
|
else if (track.kind === "video") {
|
|
406
414
|
participant.videoTrack = track;
|
package/package.json
CHANGED