@newgameplusinc/odyssey-audio-video-sdk-dev 1.0.31 → 1.0.32
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.d.ts +7 -0
- package/dist/index.js +21 -0
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -92,6 +92,13 @@ export declare class OdysseySpatialComms extends EventManager {
|
|
|
92
92
|
* Get participant's current channel
|
|
93
93
|
*/
|
|
94
94
|
getParticipantChannel(participantId: string): Promise<string>;
|
|
95
|
+
/**
|
|
96
|
+
* Mute another participant (owner only)
|
|
97
|
+
*/
|
|
98
|
+
muteParticipant(participantId: string): Promise<{
|
|
99
|
+
success?: boolean;
|
|
100
|
+
error?: string;
|
|
101
|
+
}>;
|
|
95
102
|
/**
|
|
96
103
|
* Get local participant's current channel
|
|
97
104
|
*/
|
package/dist/index.js
CHANGED
|
@@ -421,6 +421,10 @@ class OdysseySpatialComms extends EventManager_1.EventManager {
|
|
|
421
421
|
}
|
|
422
422
|
this.emit("participant-channel-changed", data);
|
|
423
423
|
});
|
|
424
|
+
this.socket.on("mute-requested", (data) => {
|
|
425
|
+
// Owner has requested this participant to mute
|
|
426
|
+
this.emit("mute-requested", data);
|
|
427
|
+
});
|
|
424
428
|
}
|
|
425
429
|
// ==================== HUDDLE METHODS ====================
|
|
426
430
|
/**
|
|
@@ -520,6 +524,23 @@ class OdysseySpatialComms extends EventManager_1.EventManager {
|
|
|
520
524
|
});
|
|
521
525
|
});
|
|
522
526
|
}
|
|
527
|
+
/**
|
|
528
|
+
* Mute another participant (owner only)
|
|
529
|
+
*/
|
|
530
|
+
async muteParticipant(participantId) {
|
|
531
|
+
if (!this.localParticipant || !this.room) {
|
|
532
|
+
return { success: false, error: "Not in a room" };
|
|
533
|
+
}
|
|
534
|
+
return new Promise((resolve) => {
|
|
535
|
+
this.socket.emit("mute-participant", {
|
|
536
|
+
targetParticipantId: participantId,
|
|
537
|
+
roomId: this.room.id,
|
|
538
|
+
requesterId: this.localParticipant.participantId,
|
|
539
|
+
}, (response) => {
|
|
540
|
+
resolve(response);
|
|
541
|
+
});
|
|
542
|
+
});
|
|
543
|
+
}
|
|
523
544
|
/**
|
|
524
545
|
* Get local participant's current channel
|
|
525
546
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -56,4 +56,4 @@ export interface ParticipantsSnapshotEvent {
|
|
|
56
56
|
}>;
|
|
57
57
|
timestamp: number;
|
|
58
58
|
}
|
|
59
|
-
export type OdysseyEvent = "connected" | "disconnected" | "room-joined" | "all-participants-update" | "new-participant" | "participant-left" | "producer-created" | "consumer-created" | "participant-media-state-updated" | "participant-position-updated" | "error" | "huddle-invite-received" | "private-huddle-started" | "huddle-updated" | "huddle-invite-rejected" | "huddle-ended" | "participant-channel-changed";
|
|
59
|
+
export type OdysseyEvent = "connected" | "disconnected" | "room-joined" | "all-participants-update" | "new-participant" | "participant-left" | "producer-created" | "consumer-created" | "participant-media-state-updated" | "participant-position-updated" | "error" | "huddle-invite-received" | "private-huddle-started" | "huddle-updated" | "huddle-invite-rejected" | "huddle-ended" | "participant-channel-changed" | "mute-requested";
|
package/package.json
CHANGED