@defcomm/meetingsdk 0.5.2 → 0.5.3

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.mts CHANGED
@@ -271,8 +271,6 @@ declare class VideoSDKCore {
271
271
  cancelJoinRequest(requestId?: string): Promise<void | undefined>;
272
272
  muteAllAudio(): Promise<void>;
273
273
  muteParticipant(participantId: string): Promise<void>;
274
- unmuteParticipant(participantId: string): Promise<void>;
275
- unmuteAllAudio(): Promise<void>;
276
274
  removeParticipant(participantId: string): Promise<void>;
277
275
  getModerators(roomCode: string): Promise<any>;
278
276
  addModerator(roomCode: string, userId: string): Promise<any>;
@@ -354,9 +352,7 @@ type MeetingContextValue = {
354
352
  rejectJoinRequest: (requestId: string) => void;
355
353
  cancelJoinRequest: (requestId?: string) => Promise<void> | undefined;
356
354
  muteAllAudio: () => Promise<void>;
357
- unmuteAllAudio: () => Promise<void>;
358
355
  muteParticipant: (participantId: string) => Promise<void>;
359
- unmuteParticipant: (participantId: string) => Promise<void>;
360
356
  removeParticipant: (participantId: string) => Promise<void>;
361
357
  getModerators: (roomCode: string) => Promise<any> | undefined;
362
358
  addModerator: (roomCode: string, userId: string) => Promise<any> | undefined;
@@ -432,9 +428,7 @@ declare const useMeeting: (handlers?: {
432
428
  rejectJoinRequest: (requestId: string) => void;
433
429
  cancelJoinRequest: (requestId?: string) => Promise<void> | undefined;
434
430
  muteAllAudio: () => Promise<void>;
435
- unmuteAllAudio: () => Promise<void>;
436
431
  muteParticipant: (participantId: string) => Promise<void>;
437
- unmuteParticipant: (participantId: string) => Promise<void>;
438
432
  removeParticipant: (participantId: string) => Promise<void>;
439
433
  getModerators: (roomCode: string) => Promise<any> | undefined;
440
434
  addModerator: (roomCode: string, userId: string) => Promise<any> | undefined;
package/dist/index.d.ts CHANGED
@@ -271,8 +271,6 @@ declare class VideoSDKCore {
271
271
  cancelJoinRequest(requestId?: string): Promise<void | undefined>;
272
272
  muteAllAudio(): Promise<void>;
273
273
  muteParticipant(participantId: string): Promise<void>;
274
- unmuteParticipant(participantId: string): Promise<void>;
275
- unmuteAllAudio(): Promise<void>;
276
274
  removeParticipant(participantId: string): Promise<void>;
277
275
  getModerators(roomCode: string): Promise<any>;
278
276
  addModerator(roomCode: string, userId: string): Promise<any>;
@@ -354,9 +352,7 @@ type MeetingContextValue = {
354
352
  rejectJoinRequest: (requestId: string) => void;
355
353
  cancelJoinRequest: (requestId?: string) => Promise<void> | undefined;
356
354
  muteAllAudio: () => Promise<void>;
357
- unmuteAllAudio: () => Promise<void>;
358
355
  muteParticipant: (participantId: string) => Promise<void>;
359
- unmuteParticipant: (participantId: string) => Promise<void>;
360
356
  removeParticipant: (participantId: string) => Promise<void>;
361
357
  getModerators: (roomCode: string) => Promise<any> | undefined;
362
358
  addModerator: (roomCode: string, userId: string) => Promise<any> | undefined;
@@ -432,9 +428,7 @@ declare const useMeeting: (handlers?: {
432
428
  rejectJoinRequest: (requestId: string) => void;
433
429
  cancelJoinRequest: (requestId?: string) => Promise<void> | undefined;
434
430
  muteAllAudio: () => Promise<void>;
435
- unmuteAllAudio: () => Promise<void>;
436
431
  muteParticipant: (participantId: string) => Promise<void>;
437
- unmuteParticipant: (participantId: string) => Promise<void>;
438
432
  removeParticipant: (participantId: string) => Promise<void>;
439
433
  getModerators: (roomCode: string) => Promise<any> | undefined;
440
434
  addModerator: (roomCode: string, userId: string) => Promise<any> | undefined;
package/dist/index.js CHANGED
@@ -882,9 +882,15 @@ var SFUClient = class {
882
882
  if (!participantId) break;
883
883
  const participant = this.participants.get(participantId);
884
884
  if (participant) {
885
- this.participants.set(participantId, { ...participant, permissions: payload.permissions });
885
+ this.participants.set(participantId, {
886
+ ...participant,
887
+ permissions: payload.permissions
888
+ });
886
889
  }
887
- this.onParticipantPermissionsChanged(participantId, payload.permissions);
890
+ this.onParticipantPermissionsChanged(
891
+ participantId,
892
+ payload.permissions
893
+ );
888
894
  break;
889
895
  }
890
896
  case "publish_answer": {
@@ -1799,42 +1805,48 @@ var SFUClient = class {
1799
1805
  this.pendingJoinRequestId = null;
1800
1806
  }
1801
1807
  async muteAllAudio() {
1802
- if (!this.send({ type: "mute_all_audio" })) throw new Error("SFU signaling is not connected");
1803
- }
1804
- async muteParticipant(participantId) {
1805
- if (!participantId) throw new Error("participantId is required");
1806
- if (!this.send({ type: "mute_participant", payload: { participant_id: participantId } })) {
1808
+ if (!this.send({ type: "mute_all_audio" }))
1807
1809
  throw new Error("SFU signaling is not connected");
1808
- }
1809
1810
  }
1810
- async unmuteParticipant(participantId) {
1811
+ async muteParticipant(participantId) {
1811
1812
  if (!participantId) throw new Error("participantId is required");
1812
- if (!this.send({ type: "unmute_participant", payload: { participant_id: participantId } })) {
1813
+ if (!this.send({
1814
+ type: "mute_participant",
1815
+ payload: { participant_id: participantId }
1816
+ })) {
1813
1817
  throw new Error("SFU signaling is not connected");
1814
1818
  }
1815
1819
  }
1816
- async unmuteAllAudio() {
1817
- if (!this.send({ type: "unmute_all_audio" })) throw new Error("SFU signaling is not connected");
1818
- }
1819
1820
  async removeParticipant(participantId) {
1820
1821
  if (!participantId) throw new Error("participantId is required");
1821
- if (!this.send({ type: "remove_participant", payload: { participant_id: participantId } })) {
1822
+ if (!this.send({
1823
+ type: "remove_participant",
1824
+ payload: { participant_id: participantId }
1825
+ })) {
1822
1826
  throw new Error("SFU signaling is not connected");
1823
1827
  }
1824
1828
  }
1825
1829
  async getModerators(roomCode) {
1826
- return this.request(`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators`);
1830
+ return this.request(
1831
+ `${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators`
1832
+ );
1827
1833
  }
1828
1834
  async addModerator(roomCode, userId) {
1829
- return this.request(`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators`, {
1830
- method: "POST",
1831
- body: JSON.stringify({ user_id: userId })
1832
- });
1835
+ return this.request(
1836
+ `${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators`,
1837
+ {
1838
+ method: "POST",
1839
+ body: JSON.stringify({ user_id: userId })
1840
+ }
1841
+ );
1833
1842
  }
1834
1843
  async removeModerator(roomCode, userId) {
1835
- return this.request(`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators/${encodeURIComponent(userId)}`, {
1836
- method: "DELETE"
1837
- });
1844
+ return this.request(
1845
+ `${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators/${encodeURIComponent(userId)}`,
1846
+ {
1847
+ method: "DELETE"
1848
+ }
1849
+ );
1838
1850
  }
1839
1851
  isSocketOpen() {
1840
1852
  return this.ws?.readyState === WebSocket.OPEN;
@@ -2747,14 +2759,6 @@ var VideoSDKCore = class {
2747
2759
  if (!this.sfuClient) throw new Error("SFU client is not connected");
2748
2760
  return this.sfuClient.muteParticipant(participantId);
2749
2761
  }
2750
- async unmuteParticipant(participantId) {
2751
- if (!this.sfuClient) throw new Error("SFU client is not connected");
2752
- return this.sfuClient.unmuteParticipant(participantId);
2753
- }
2754
- async unmuteAllAudio() {
2755
- if (!this.sfuClient) throw new Error("SFU client is not connected");
2756
- return this.sfuClient.unmuteAllAudio();
2757
- }
2758
2762
  async removeParticipant(participantId) {
2759
2763
  if (!this.sfuClient) throw new Error("SFU client is not connected");
2760
2764
  return this.sfuClient.removeParticipant(participantId);
@@ -3203,9 +3207,7 @@ var MeetingProvider = ({
3203
3207
  rejectJoinRequest: sdk.rejectJoinRequest.bind(sdk),
3204
3208
  cancelJoinRequest: sdk.cancelJoinRequest.bind(sdk),
3205
3209
  muteAllAudio: sdk.muteAllAudio.bind(sdk),
3206
- unmuteAllAudio: sdk.unmuteAllAudio.bind(sdk),
3207
3210
  muteParticipant: sdk.muteParticipant.bind(sdk),
3208
- unmuteParticipant: sdk.unmuteParticipant.bind(sdk),
3209
3211
  removeParticipant: sdk.removeParticipant.bind(sdk),
3210
3212
  getModerators: sdk.getModerators.bind(sdk),
3211
3213
  addModerator: sdk.addModerator.bind(sdk),