@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.
@@ -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
- nodes.stream.getTracks().forEach((track) => track.stop());
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
- // Only update spatial position if in spatial channel
396
- if (!isInHuddle) {
397
- this.spatialAudioManager.updateSpatialAudio(participant.participantId, data.position);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newgameplusinc/odyssey-audio-video-sdk-dev",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "description": "Odyssey Spatial Audio & Video SDK using MediaSoup for real-time communication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",