@newgameplusinc/odyssey-audio-video-sdk-dev 1.0.46 â 1.0.48
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/MediasoupManager.js +3 -25
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/MediasoupManager.js
CHANGED
|
@@ -104,21 +104,6 @@ class MediasoupManager {
|
|
|
104
104
|
async produce(track, appData) {
|
|
105
105
|
if (!this.sendTransport)
|
|
106
106
|
throw new Error("Send transport not initialized");
|
|
107
|
-
console.log(`đ [MediaSoup] Attempting to produce ${track.kind} track, transport state:`, {
|
|
108
|
-
id: this.sendTransport.id,
|
|
109
|
-
closed: this.sendTransport.closed,
|
|
110
|
-
connectionState: this.sendTransport.connectionState,
|
|
111
|
-
});
|
|
112
|
-
// Check if transport is closed or failed
|
|
113
|
-
if (this.sendTransport.closed) {
|
|
114
|
-
throw new Error("Send transport is closed");
|
|
115
|
-
}
|
|
116
|
-
// Check if this track is already being produced
|
|
117
|
-
const existingProducer = Array.from(this.producers.values()).find(p => p.track?.id === track.id);
|
|
118
|
-
if (existingProducer) {
|
|
119
|
-
console.log(`âšī¸ [MediaSoup] Track ${track.id} already being produced, returning existing producer`);
|
|
120
|
-
return existingProducer;
|
|
121
|
-
}
|
|
122
107
|
// Configure simulcast for video tracks for adaptive bitrate
|
|
123
108
|
const produceOptions = { track, appData };
|
|
124
109
|
if (track.kind === 'video') {
|
|
@@ -135,16 +120,9 @@ class MediasoupManager {
|
|
|
135
120
|
videoGoogleStartBitrate: 1000
|
|
136
121
|
};
|
|
137
122
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
console.log(`â
[MediaSoup] Successfully produced ${track.kind} track`);
|
|
142
|
-
return producer;
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
console.error(`â [MediaSoup] Failed to produce ${track.kind} track:`, error);
|
|
146
|
-
throw error;
|
|
147
|
-
}
|
|
123
|
+
const producer = await this.sendTransport.produce(produceOptions);
|
|
124
|
+
this.producers.set(producer.id, producer);
|
|
125
|
+
return producer;
|
|
148
126
|
}
|
|
149
127
|
async consume(data) {
|
|
150
128
|
if (!this.recvTransport)
|
package/dist/index.js
CHANGED
|
@@ -381,6 +381,8 @@ class OdysseySpatialComms extends EventManager_1.EventManager {
|
|
|
381
381
|
participant.userName = data.userName;
|
|
382
382
|
if (data.userEmail !== undefined)
|
|
383
383
|
participant.userEmail = data.userEmail;
|
|
384
|
+
if (data.currentChannel !== undefined)
|
|
385
|
+
participant.currentChannel = data.currentChannel;
|
|
384
386
|
// Only update spatial audio if NOT in huddle
|
|
385
387
|
const participantChannel = participant.currentChannel;
|
|
386
388
|
const isInHuddle = participantChannel === "odyssey-huddle";
|
package/package.json
CHANGED