@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.mjs CHANGED
@@ -852,9 +852,15 @@ var SFUClient = class {
852
852
  if (!participantId) break;
853
853
  const participant = this.participants.get(participantId);
854
854
  if (participant) {
855
- this.participants.set(participantId, { ...participant, permissions: payload.permissions });
855
+ this.participants.set(participantId, {
856
+ ...participant,
857
+ permissions: payload.permissions
858
+ });
856
859
  }
857
- this.onParticipantPermissionsChanged(participantId, payload.permissions);
860
+ this.onParticipantPermissionsChanged(
861
+ participantId,
862
+ payload.permissions
863
+ );
858
864
  break;
859
865
  }
860
866
  case "publish_answer": {
@@ -1769,42 +1775,48 @@ var SFUClient = class {
1769
1775
  this.pendingJoinRequestId = null;
1770
1776
  }
1771
1777
  async muteAllAudio() {
1772
- if (!this.send({ type: "mute_all_audio" })) throw new Error("SFU signaling is not connected");
1773
- }
1774
- async muteParticipant(participantId) {
1775
- if (!participantId) throw new Error("participantId is required");
1776
- if (!this.send({ type: "mute_participant", payload: { participant_id: participantId } })) {
1778
+ if (!this.send({ type: "mute_all_audio" }))
1777
1779
  throw new Error("SFU signaling is not connected");
1778
- }
1779
1780
  }
1780
- async unmuteParticipant(participantId) {
1781
+ async muteParticipant(participantId) {
1781
1782
  if (!participantId) throw new Error("participantId is required");
1782
- if (!this.send({ type: "unmute_participant", payload: { participant_id: participantId } })) {
1783
+ if (!this.send({
1784
+ type: "mute_participant",
1785
+ payload: { participant_id: participantId }
1786
+ })) {
1783
1787
  throw new Error("SFU signaling is not connected");
1784
1788
  }
1785
1789
  }
1786
- async unmuteAllAudio() {
1787
- if (!this.send({ type: "unmute_all_audio" })) throw new Error("SFU signaling is not connected");
1788
- }
1789
1790
  async removeParticipant(participantId) {
1790
1791
  if (!participantId) throw new Error("participantId is required");
1791
- if (!this.send({ type: "remove_participant", payload: { participant_id: participantId } })) {
1792
+ if (!this.send({
1793
+ type: "remove_participant",
1794
+ payload: { participant_id: participantId }
1795
+ })) {
1792
1796
  throw new Error("SFU signaling is not connected");
1793
1797
  }
1794
1798
  }
1795
1799
  async getModerators(roomCode) {
1796
- return this.request(`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators`);
1800
+ return this.request(
1801
+ `${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators`
1802
+ );
1797
1803
  }
1798
1804
  async addModerator(roomCode, userId) {
1799
- return this.request(`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators`, {
1800
- method: "POST",
1801
- body: JSON.stringify({ user_id: userId })
1802
- });
1805
+ return this.request(
1806
+ `${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators`,
1807
+ {
1808
+ method: "POST",
1809
+ body: JSON.stringify({ user_id: userId })
1810
+ }
1811
+ );
1803
1812
  }
1804
1813
  async removeModerator(roomCode, userId) {
1805
- return this.request(`${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators/${encodeURIComponent(userId)}`, {
1806
- method: "DELETE"
1807
- });
1814
+ return this.request(
1815
+ `${this.apiBase}/rooms/${encodeURIComponent(roomCode)}/moderators/${encodeURIComponent(userId)}`,
1816
+ {
1817
+ method: "DELETE"
1818
+ }
1819
+ );
1808
1820
  }
1809
1821
  isSocketOpen() {
1810
1822
  return this.ws?.readyState === WebSocket.OPEN;
@@ -2717,14 +2729,6 @@ var VideoSDKCore = class {
2717
2729
  if (!this.sfuClient) throw new Error("SFU client is not connected");
2718
2730
  return this.sfuClient.muteParticipant(participantId);
2719
2731
  }
2720
- async unmuteParticipant(participantId) {
2721
- if (!this.sfuClient) throw new Error("SFU client is not connected");
2722
- return this.sfuClient.unmuteParticipant(participantId);
2723
- }
2724
- async unmuteAllAudio() {
2725
- if (!this.sfuClient) throw new Error("SFU client is not connected");
2726
- return this.sfuClient.unmuteAllAudio();
2727
- }
2728
2732
  async removeParticipant(participantId) {
2729
2733
  if (!this.sfuClient) throw new Error("SFU client is not connected");
2730
2734
  return this.sfuClient.removeParticipant(participantId);
@@ -3173,9 +3177,7 @@ var MeetingProvider = ({
3173
3177
  rejectJoinRequest: sdk.rejectJoinRequest.bind(sdk),
3174
3178
  cancelJoinRequest: sdk.cancelJoinRequest.bind(sdk),
3175
3179
  muteAllAudio: sdk.muteAllAudio.bind(sdk),
3176
- unmuteAllAudio: sdk.unmuteAllAudio.bind(sdk),
3177
3180
  muteParticipant: sdk.muteParticipant.bind(sdk),
3178
- unmuteParticipant: sdk.unmuteParticipant.bind(sdk),
3179
3181
  removeParticipant: sdk.removeParticipant.bind(sdk),
3180
3182
  getModerators: sdk.getModerators.bind(sdk),
3181
3183
  addModerator: sdk.addModerator.bind(sdk),