@whereby.com/core 1.9.14 → 1.9.16

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.cjs CHANGED
@@ -1158,7 +1158,7 @@ const createReactor = (selectors, callback) => {
1158
1158
  });
1159
1159
  };
1160
1160
 
1161
- const coreVersion = "1.9.14";
1161
+ const coreVersion = "1.9.16";
1162
1162
 
1163
1163
  const initialState$1 = {
1164
1164
  displayName: null,
@@ -3013,22 +3013,23 @@ const doHandleAcceptStreams = createAppThunk((payload) => (dispatch, getState) =
3013
3013
  if (!participant)
3014
3014
  continue;
3015
3015
  if (state === "to_accept" ||
3016
- (state === "new_accept" && shouldAcceptNewClients) ||
3017
- (state === "old_accept" && !shouldAcceptNewClients)) {
3016
+ (state === "new_accept" && shouldAcceptNewClients)) {
3018
3017
  rtcManager.acceptNewStream({
3019
3018
  streamId: streamId === media.CAMERA_STREAM_ID ? clientId : streamId,
3020
3019
  clientId,
3021
3020
  });
3022
3021
  }
3023
- else if (state === "new_accept" || state === "old_accept") ;
3022
+ else if (state === "new_accept") ;
3024
3023
  else if (state === "to_unaccept") {
3025
- rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(streamId === media.CAMERA_STREAM_ID ? clientId : streamId);
3024
+ if (streamId === media.CAMERA_STREAM_ID) {
3025
+ rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(clientId);
3026
+ }
3026
3027
  }
3027
3028
  else if (state !== "done_accept") {
3028
3029
  continue;
3029
3030
  }
3030
3031
  else ;
3031
- updates.push({ clientId, streamId, state: state.replace(/to_|new_|old_/, "done_") });
3032
+ updates.push({ clientId, streamId, state: state.replace(/to_|new_/, "done_") });
3032
3033
  }
3033
3034
  dispatch(streamStatusUpdated(updates));
3034
3035
  dispatch(isAcceptingStreams(false));
package/dist/index.d.cts CHANGED
@@ -417,7 +417,7 @@ interface RemoteParticipantData {
417
417
  newJoiner: boolean;
418
418
  streams: string[];
419
419
  }
420
- type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
420
+ type StreamState = "new_accept" | "to_accept" | "done_accept" | "to_unaccept" | "done_unaccept";
421
421
  interface Stream {
422
422
  id: string;
423
423
  state: StreamState;
package/dist/index.d.mts CHANGED
@@ -417,7 +417,7 @@ interface RemoteParticipantData {
417
417
  newJoiner: boolean;
418
418
  streams: string[];
419
419
  }
420
- type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
420
+ type StreamState = "new_accept" | "to_accept" | "done_accept" | "to_unaccept" | "done_unaccept";
421
421
  interface Stream {
422
422
  id: string;
423
423
  state: StreamState;
package/dist/index.d.ts CHANGED
@@ -417,7 +417,7 @@ interface RemoteParticipantData {
417
417
  newJoiner: boolean;
418
418
  streams: string[];
419
419
  }
420
- type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
420
+ type StreamState = "new_accept" | "to_accept" | "done_accept" | "to_unaccept" | "done_unaccept";
421
421
  interface Stream {
422
422
  id: string;
423
423
  state: StreamState;
package/dist/index.mjs CHANGED
@@ -1156,7 +1156,7 @@ const createReactor = (selectors, callback) => {
1156
1156
  });
1157
1157
  };
1158
1158
 
1159
- const coreVersion = "1.9.14";
1159
+ const coreVersion = "1.9.16";
1160
1160
 
1161
1161
  const initialState$1 = {
1162
1162
  displayName: null,
@@ -3011,22 +3011,23 @@ const doHandleAcceptStreams = createAppThunk((payload) => (dispatch, getState) =
3011
3011
  if (!participant)
3012
3012
  continue;
3013
3013
  if (state === "to_accept" ||
3014
- (state === "new_accept" && shouldAcceptNewClients) ||
3015
- (state === "old_accept" && !shouldAcceptNewClients)) {
3014
+ (state === "new_accept" && shouldAcceptNewClients)) {
3016
3015
  rtcManager.acceptNewStream({
3017
3016
  streamId: streamId === CAMERA_STREAM_ID ? clientId : streamId,
3018
3017
  clientId,
3019
3018
  });
3020
3019
  }
3021
- else if (state === "new_accept" || state === "old_accept") ;
3020
+ else if (state === "new_accept") ;
3022
3021
  else if (state === "to_unaccept") {
3023
- rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(streamId === CAMERA_STREAM_ID ? clientId : streamId);
3022
+ if (streamId === CAMERA_STREAM_ID) {
3023
+ rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(clientId);
3024
+ }
3024
3025
  }
3025
3026
  else if (state !== "done_accept") {
3026
3027
  continue;
3027
3028
  }
3028
3029
  else ;
3029
- updates.push({ clientId, streamId, state: state.replace(/to_|new_|old_/, "done_") });
3030
+ updates.push({ clientId, streamId, state: state.replace(/to_|new_/, "done_") });
3030
3031
  }
3031
3032
  dispatch(streamStatusUpdated(updates));
3032
3033
  dispatch(isAcceptingStreams(false));
@@ -1156,7 +1156,7 @@ const createReactor = (selectors, callback) => {
1156
1156
  });
1157
1157
  };
1158
1158
 
1159
- const coreVersion = "1.9.14";
1159
+ const coreVersion = "1.9.16";
1160
1160
 
1161
1161
  const initialState$1 = {
1162
1162
  displayName: null,
@@ -3011,22 +3011,23 @@ const doHandleAcceptStreams = createAppThunk((payload) => (dispatch, getState) =
3011
3011
  if (!participant)
3012
3012
  continue;
3013
3013
  if (state === "to_accept" ||
3014
- (state === "new_accept" && shouldAcceptNewClients) ||
3015
- (state === "old_accept" && !shouldAcceptNewClients)) {
3014
+ (state === "new_accept" && shouldAcceptNewClients)) {
3016
3015
  rtcManager.acceptNewStream({
3017
3016
  streamId: streamId === CAMERA_STREAM_ID ? clientId : streamId,
3018
3017
  clientId,
3019
3018
  });
3020
3019
  }
3021
- else if (state === "new_accept" || state === "old_accept") ;
3020
+ else if (state === "new_accept") ;
3022
3021
  else if (state === "to_unaccept") {
3023
- rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(streamId === CAMERA_STREAM_ID ? clientId : streamId);
3022
+ if (streamId === CAMERA_STREAM_ID) {
3023
+ rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(clientId);
3024
+ }
3024
3025
  }
3025
3026
  else if (state !== "done_accept") {
3026
3027
  continue;
3027
3028
  }
3028
3029
  else ;
3029
- updates.push({ clientId, streamId, state: state.replace(/to_|new_|old_/, "done_") });
3030
+ updates.push({ clientId, streamId, state: state.replace(/to_|new_/, "done_") });
3030
3031
  }
3031
3032
  dispatch(streamStatusUpdated(updates));
3032
3033
  dispatch(isAcceptingStreams(false));
@@ -75,7 +75,7 @@ const createReactor = (selectors, callback) => {
75
75
  });
76
76
  };
77
77
 
78
- const coreVersion = "1.9.14";
78
+ const coreVersion = "1.9.16";
79
79
 
80
80
  const initialState$1 = {
81
81
  displayName: null,
@@ -1917,22 +1917,23 @@ const doHandleAcceptStreams = createAppThunk((payload) => (dispatch, getState) =
1917
1917
  if (!participant)
1918
1918
  continue;
1919
1919
  if (state === "to_accept" ||
1920
- (state === "new_accept" && shouldAcceptNewClients) ||
1921
- (state === "old_accept" && !shouldAcceptNewClients)) {
1920
+ (state === "new_accept" && shouldAcceptNewClients)) {
1922
1921
  rtcManager.acceptNewStream({
1923
1922
  streamId: streamId === media.CAMERA_STREAM_ID ? clientId : streamId,
1924
1923
  clientId,
1925
1924
  });
1926
1925
  }
1927
- else if (state === "new_accept" || state === "old_accept") ;
1926
+ else if (state === "new_accept") ;
1928
1927
  else if (state === "to_unaccept") {
1929
- rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(streamId === media.CAMERA_STREAM_ID ? clientId : streamId);
1928
+ if (streamId === media.CAMERA_STREAM_ID) {
1929
+ rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(clientId);
1930
+ }
1930
1931
  }
1931
1932
  else if (state !== "done_accept") {
1932
1933
  continue;
1933
1934
  }
1934
1935
  else ;
1935
- updates.push({ clientId, streamId, state: state.replace(/to_|new_|old_/, "done_") });
1936
+ updates.push({ clientId, streamId, state: state.replace(/to_|new_/, "done_") });
1936
1937
  }
1937
1938
  dispatch(streamStatusUpdated(updates));
1938
1939
  dispatch(isAcceptingStreams(false));
@@ -334,7 +334,7 @@ declare class RoomParticipant {
334
334
  readonly isAudioRecorder: boolean;
335
335
  constructor({ breakoutGroup, displayName, id, isAudioEnabled, isAudioRecorder, isDialIn, isVideoEnabled, stickyReaction, stream, }: RoomParticipantData);
336
336
  }
337
- type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
337
+ type StreamState = "new_accept" | "to_accept" | "done_accept" | "to_unaccept" | "done_unaccept";
338
338
  interface Stream {
339
339
  id: string;
340
340
  state: StreamState;
@@ -334,7 +334,7 @@ declare class RoomParticipant {
334
334
  readonly isAudioRecorder: boolean;
335
335
  constructor({ breakoutGroup, displayName, id, isAudioEnabled, isAudioRecorder, isDialIn, isVideoEnabled, stickyReaction, stream, }: RoomParticipantData);
336
336
  }
337
- type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
337
+ type StreamState = "new_accept" | "to_accept" | "done_accept" | "to_unaccept" | "done_unaccept";
338
338
  interface Stream {
339
339
  id: string;
340
340
  state: StreamState;
@@ -334,7 +334,7 @@ declare class RoomParticipant {
334
334
  readonly isAudioRecorder: boolean;
335
335
  constructor({ breakoutGroup, displayName, id, isAudioEnabled, isAudioRecorder, isDialIn, isVideoEnabled, stickyReaction, stream, }: RoomParticipantData);
336
336
  }
337
- type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
337
+ type StreamState = "new_accept" | "to_accept" | "done_accept" | "to_unaccept" | "done_unaccept";
338
338
  interface Stream {
339
339
  id: string;
340
340
  state: StreamState;
@@ -73,7 +73,7 @@ const createReactor = (selectors, callback) => {
73
73
  });
74
74
  };
75
75
 
76
- const coreVersion = "1.9.14";
76
+ const coreVersion = "1.9.16";
77
77
 
78
78
  const initialState$1 = {
79
79
  displayName: null,
@@ -1915,22 +1915,23 @@ const doHandleAcceptStreams = createAppThunk((payload) => (dispatch, getState) =
1915
1915
  if (!participant)
1916
1916
  continue;
1917
1917
  if (state === "to_accept" ||
1918
- (state === "new_accept" && shouldAcceptNewClients) ||
1919
- (state === "old_accept" && !shouldAcceptNewClients)) {
1918
+ (state === "new_accept" && shouldAcceptNewClients)) {
1920
1919
  rtcManager.acceptNewStream({
1921
1920
  streamId: streamId === CAMERA_STREAM_ID ? clientId : streamId,
1922
1921
  clientId,
1923
1922
  });
1924
1923
  }
1925
- else if (state === "new_accept" || state === "old_accept") ;
1924
+ else if (state === "new_accept") ;
1926
1925
  else if (state === "to_unaccept") {
1927
- rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(streamId === CAMERA_STREAM_ID ? clientId : streamId);
1926
+ if (streamId === CAMERA_STREAM_ID) {
1927
+ rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(clientId);
1928
+ }
1928
1929
  }
1929
1930
  else if (state !== "done_accept") {
1930
1931
  continue;
1931
1932
  }
1932
1933
  else ;
1933
- updates.push({ clientId, streamId, state: state.replace(/to_|new_|old_/, "done_") });
1934
+ updates.push({ clientId, streamId, state: state.replace(/to_|new_/, "done_") });
1934
1935
  }
1935
1936
  dispatch(streamStatusUpdated(updates));
1936
1937
  dispatch(isAcceptingStreams(false));
@@ -73,7 +73,7 @@ const createReactor = (selectors, callback) => {
73
73
  });
74
74
  };
75
75
 
76
- const coreVersion = "1.9.14";
76
+ const coreVersion = "1.9.16";
77
77
 
78
78
  const initialState$1 = {
79
79
  displayName: null,
@@ -1915,22 +1915,23 @@ const doHandleAcceptStreams = createAppThunk((payload) => (dispatch, getState) =
1915
1915
  if (!participant)
1916
1916
  continue;
1917
1917
  if (state === "to_accept" ||
1918
- (state === "new_accept" && shouldAcceptNewClients) ||
1919
- (state === "old_accept" && !shouldAcceptNewClients)) {
1918
+ (state === "new_accept" && shouldAcceptNewClients)) {
1920
1919
  rtcManager.acceptNewStream({
1921
1920
  streamId: streamId === CAMERA_STREAM_ID ? clientId : streamId,
1922
1921
  clientId,
1923
1922
  });
1924
1923
  }
1925
- else if (state === "new_accept" || state === "old_accept") ;
1924
+ else if (state === "new_accept") ;
1926
1925
  else if (state === "to_unaccept") {
1927
- rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(streamId === CAMERA_STREAM_ID ? clientId : streamId);
1926
+ if (streamId === CAMERA_STREAM_ID) {
1927
+ rtcManager === null || rtcManager === void 0 ? void 0 : rtcManager.disconnect(clientId);
1928
+ }
1928
1929
  }
1929
1930
  else if (state !== "done_accept") {
1930
1931
  continue;
1931
1932
  }
1932
1933
  else ;
1933
- updates.push({ clientId, streamId, state: state.replace(/to_|new_|old_/, "done_") });
1934
+ updates.push({ clientId, streamId, state: state.replace(/to_|new_/, "done_") });
1934
1935
  }
1935
1936
  dispatch(streamStatusUpdated(updates));
1936
1937
  dispatch(isAcceptingStreams(false));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@whereby.com/core",
3
3
  "description": "Core library for whereby.com sdk",
4
4
  "author": "Whereby AS",
5
- "version": "1.9.14",
5
+ "version": "1.9.16",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@reduxjs/toolkit": "^2.2.3",
69
- "@whereby.com/media": "8.0.9",
69
+ "@whereby.com/media": "8.0.10",
70
70
  "axios": "^1.11.0",
71
71
  "btoa": "^1.2.1",
72
72
  "events": "^3.3.0"