@newgameplusinc/odyssey-audio-video-sdk-dev 1.0.78 → 1.0.80
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/SpatialAudioManager.js +6 -1
- package/dist/index.js +4 -3
- package/package.json +1 -1
|
@@ -360,6 +360,9 @@ class SpatialAudioManager extends EventManager_1.EventManager {
|
|
|
360
360
|
const normalizedBodyPosition = this.normalizePositionUnits(position);
|
|
361
361
|
const speakerHeadPosition = this.computeHeadPosition(normalizedBodyPosition);
|
|
362
362
|
const listenerPos = this.listenerPosition; // This is listener HEAD position
|
|
363
|
+
// DEBUG: Log listener position details
|
|
364
|
+
console.log(`🔍 [DEBUG] Listener position check: ` +
|
|
365
|
+
`listenerPos=(${listenerPos.x.toFixed(2)}, ${listenerPos.y.toFixed(2)}, ${listenerPos.z.toFixed(2)})`);
|
|
363
366
|
// 🎧 [SDK Rx] Log received data
|
|
364
367
|
console.log(`🎧 [SDK Rx] ${participantId.substring(0, 8)} ` +
|
|
365
368
|
`bodyPos=(${normalizedBodyPosition.x.toFixed(2)}, ${normalizedBodyPosition.y.toFixed(2)}, ${normalizedBodyPosition.z.toFixed(2)}) ` +
|
|
@@ -561,7 +564,9 @@ class SpatialAudioManager extends EventManager_1.EventManager {
|
|
|
561
564
|
if (nodes.denoiseNode) {
|
|
562
565
|
nodes.denoiseNode.disconnect();
|
|
563
566
|
}
|
|
564
|
-
|
|
567
|
+
// DON'T stop tracks - they're managed by MediaSoup
|
|
568
|
+
// Just disconnect the audio nodes from the graph
|
|
569
|
+
// nodes.stream.getTracks().forEach((track) => track.stop());
|
|
565
570
|
this.participantNodes.delete(participantId);
|
|
566
571
|
}
|
|
567
572
|
}
|
package/dist/index.js
CHANGED
|
@@ -392,9 +392,10 @@ class OdysseySpatialComms extends EventManager_1.EventManager {
|
|
|
392
392
|
// Setup spatial audio - bypass 3D positioning for huddle members
|
|
393
393
|
await this.spatialAudioManager.setupSpatialAudioForParticipant(participant.participantId, track, isInHuddle // Bypass spatialization if in huddle
|
|
394
394
|
);
|
|
395
|
-
//
|
|
396
|
-
|
|
397
|
-
|
|
395
|
+
// Initialize spatial position with current data if available
|
|
396
|
+
// This ensures audio is positioned immediately on consumer creation
|
|
397
|
+
if (!isInHuddle && participant.position) {
|
|
398
|
+
this.spatialAudioManager.updateSpatialAudio(participant.participantId, participant.position, participant.direction);
|
|
398
399
|
}
|
|
399
400
|
}
|
|
400
401
|
// NOW resume the consumer after audio pipeline is ready
|
package/package.json
CHANGED