@whereby.com/media 11.1.3 → 11.2.1

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
@@ -835,6 +835,9 @@ const PROTOCOL_RESPONSES = {
835
835
  PLAY_CLIENT_STICKER: "play_client_sticker",
836
836
  ROOM_INTEGRATION_ENABLED: "room_integration_enabled",
837
837
  ROOM_INTEGRATION_DISABLED: "room_integration_disabled",
838
+ ROOM_INTEGRATION_STARTED: "room_integration_started",
839
+ ROOM_INTEGRATION_STOPPED: "room_integration_stopped",
840
+ ROOM_INTEGRATION_PROPS_UPDATED: "room_integration_props_updated",
838
841
  ROOM_JOINED: "room_joined",
839
842
  ROOM_KNOCKED: "room_knocked",
840
843
  ROOM_LEFT: "room_left",
@@ -2408,6 +2411,16 @@ const FILE_SHARE_ERROR_CODES = [
2408
2411
  function isFileShareError(payload) {
2409
2412
  return "error" in payload && FILE_SHARE_ERROR_CODES.includes(payload.error);
2410
2413
  }
2414
+ const ROOM_INTEGRATION_ERROR_CODES = [
2415
+ "not_in_a_room",
2416
+ "forbidden",
2417
+ "missing_parameters",
2418
+ "invalid_parameters",
2419
+ "internal_server_error",
2420
+ ];
2421
+ function isRoomIntegrationErrorCode(error) {
2422
+ return ROOM_INTEGRATION_ERROR_CODES.includes(error);
2423
+ }
2411
2424
 
2412
2425
  const defaultSubdomainPattern = /^(?:([^.]+)[.])?((:?[^.]+[.]){1,}[^.]+)$/;
2413
2426
  const localstackPattern = /^(?:([^.]+)-)?(ip-[^.]*[.](?:hereby[.]dev|rfc1918[.]disappear[.]at)(?::\d+|))$/;
@@ -4388,6 +4401,7 @@ class VegaRtcManager {
4388
4401
  this._sndTransportIceRestartPromise = null;
4389
4402
  this._rcvTransportIceRestartPromise = null;
4390
4403
  this._colocation = null;
4404
+ this._isAudioOnlyMode = false;
4391
4405
  this._audioTrackOnEnded = () => {
4392
4406
  rtcStats.sendEvent("audio_ended", { unloading });
4393
4407
  this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
@@ -4662,6 +4676,8 @@ class VegaRtcManager {
4662
4676
  });
4663
4677
  if (this._colocation)
4664
4678
  this._vegaConnection.message("setColocation", { colocation: this._colocation });
4679
+ if (this._isAudioOnlyMode)
4680
+ this._vegaConnection.message("enableAudioOnly");
4665
4681
  yield Promise.all([this._createTransport(true), this._createTransport(false)]);
4666
4682
  const mediaPromises = [];
4667
4683
  if (this._micTrack && !this._micProducer && !this._micProducerPromise)
@@ -5390,6 +5406,7 @@ class VegaRtcManager {
5390
5406
  }
5391
5407
  setAudioOnly(audioOnly) {
5392
5408
  var _a;
5409
+ this._isAudioOnlyMode = audioOnly;
5393
5410
  (_a = this._vegaConnection) === null || _a === void 0 ? void 0 : _a.message(audioOnly ? "enableAudioOnly" : "disableAudioOnly");
5394
5411
  }
5395
5412
  setRemoteScreenshareVideoTrackIds() { }
@@ -7954,6 +7971,7 @@ exports.PROTOCOL_EVENTS = PROTOCOL_EVENTS;
7954
7971
  exports.PROTOCOL_REQUESTS = PROTOCOL_REQUESTS;
7955
7972
  exports.PROTOCOL_RESPONSES = PROTOCOL_RESPONSES;
7956
7973
  exports.RELAY_MESSAGES = RELAY_MESSAGES;
7974
+ exports.ROOM_INTEGRATION_ERROR_CODES = ROOM_INTEGRATION_ERROR_CODES;
7957
7975
  exports.ReconnectManager = ReconnectManager;
7958
7976
  exports.RtcManagerDispatcher = RtcManagerDispatcher;
7959
7977
  exports.SCREEN_SHARE_SETTINGS = SCREEN_SHARE_SETTINGS;
@@ -8015,6 +8033,7 @@ exports.hasGetDisplayMedia = hasGetDisplayMedia;
8015
8033
  exports.ipRegex = ipRegex;
8016
8034
  exports.isFileShareError = isFileShareError;
8017
8035
  exports.isMobile = isMobile;
8036
+ exports.isRoomIntegrationErrorCode = isRoomIntegrationErrorCode;
8018
8037
  exports.issueDetectorOrMetricEnabled = issueDetectorOrMetricEnabled;
8019
8038
  exports.maybeTurnOnly = maybeTurnOnly;
8020
8039
  exports.modifyMediaCapabilities = modifyMediaCapabilities;
package/dist/index.d.cts CHANGED
@@ -531,6 +531,7 @@ interface RtcManager {
531
531
  isSfu: boolean;
532
532
  }): boolean;
533
533
  setEventClaim?(eventClaim: string): void;
534
+ setAudioOnly(audioOnly: boolean): void;
534
535
  setRemoteScreenshareVideoTrackIds(remoteScreenshareVideoTrackIds: string[]): void;
535
536
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
536
537
  removeRemoteClientMediaPrefs(clientId: string): void;
@@ -1072,10 +1073,72 @@ interface RoomJoinedSuccess {
1072
1073
  clientClaim: string;
1073
1074
  breakout?: BreakoutConfig;
1074
1075
  eventClaim: string;
1076
+ roomIntegrationSession?: RoomIntegrationSessionEvent[];
1075
1077
  }
1076
1078
  type RoomJoinedEvent = RoomJoinedErrors | RoomJoinedSuccess;
1077
1079
  interface BreakoutSessionUpdatedEvent extends BreakoutConfig {
1078
1080
  }
1081
+ type RoomIntegrationProps = {
1082
+ [key: string]: string | number | boolean | null;
1083
+ };
1084
+ interface RoomIntegrationSessionState {
1085
+ tagName: string;
1086
+ shareUrl: string;
1087
+ props: RoomIntegrationProps;
1088
+ userId?: string;
1089
+ clientId: string;
1090
+ }
1091
+ interface RoomIntegrationSessionTiming {
1092
+ roomIntegrationSessionStartedAt?: number;
1093
+ }
1094
+ interface RoomIntegrationSessionEvent extends RoomIntegrationSessionState, RoomIntegrationSessionTiming {
1095
+ roomIntegrationId: number | string;
1096
+ roomIntegrationSessionId: string;
1097
+ breakoutGroupId?: string | null;
1098
+ }
1099
+ declare const ROOM_INTEGRATION_ERROR_CODES: readonly ["not_in_a_room", "forbidden", "missing_parameters", "invalid_parameters", "internal_server_error"];
1100
+ type RoomIntegrationErrorCode = (typeof ROOM_INTEGRATION_ERROR_CODES)[number];
1101
+ interface RoomIntegrationError {
1102
+ error: string;
1103
+ }
1104
+ declare function isRoomIntegrationErrorCode(error: string): error is RoomIntegrationErrorCode;
1105
+ interface RoomIntegrationStartedSuccess extends RoomIntegrationSessionTiming {
1106
+ roomIntegrationId: number | string;
1107
+ roomIntegrationSessionId: string;
1108
+ breakoutGroupId?: string | null;
1109
+ state: RoomIntegrationSessionState;
1110
+ }
1111
+ type RoomIntegrationStartedEvent = RoomIntegrationStartedSuccess | RoomIntegrationError;
1112
+ interface RoomIntegrationStoppedSuccess {
1113
+ roomIntegrationSessionId: string;
1114
+ intent?: "stop" | "end";
1115
+ clientId?: string;
1116
+ }
1117
+ type RoomIntegrationStoppedEvent = RoomIntegrationStoppedSuccess | RoomIntegrationError;
1118
+ interface RoomIntegrationPropsUpdatedSuccess {
1119
+ roomIntegrationSessionId: string;
1120
+ props: RoomIntegrationProps;
1121
+ }
1122
+ type RoomIntegrationPropsUpdatedEvent = RoomIntegrationPropsUpdatedSuccess | RoomIntegrationError;
1123
+ interface RoomIntegrationEnabledEvent {
1124
+ roomIntegrationId: number | string;
1125
+ }
1126
+ interface RoomIntegrationDisabledEvent {
1127
+ roomIntegrationId: number | string;
1128
+ }
1129
+ interface StartRoomIntegrationRequest {
1130
+ roomIntegrationId: number;
1131
+ breakoutGroupId: string | null;
1132
+ state: RoomIntegrationSessionState;
1133
+ }
1134
+ interface StopRoomIntegrationRequest {
1135
+ roomIntegrationSessionId: string;
1136
+ intent: "stop" | "end";
1137
+ }
1138
+ interface UpdateRoomIntegrationPropsRequest {
1139
+ roomIntegrationSessionId: string;
1140
+ props: RoomIntegrationProps;
1141
+ }
1079
1142
  interface RoomKnockedEvent {
1080
1143
  clientId: string;
1081
1144
  displayName: string | null;
@@ -1183,6 +1246,11 @@ interface SignalEvents {
1183
1246
  knock_handled: KnockAcceptedEvent | KnockOnHoldEvent | KnockRejectedEvent;
1184
1247
  knocker_left: KnockerLeftEvent;
1185
1248
  new_client: NewClientEvent;
1249
+ room_integration_started: RoomIntegrationStartedEvent;
1250
+ room_integration_stopped: RoomIntegrationStoppedEvent;
1251
+ room_integration_props_updated: RoomIntegrationPropsUpdatedEvent;
1252
+ room_integration_enabled: RoomIntegrationEnabledEvent;
1253
+ room_integration_disabled: RoomIntegrationDisabledEvent;
1186
1254
  room_joined: RoomJoinedEvent;
1187
1255
  room_knocked: RoomKnockedEvent;
1188
1256
  room_left: void;
@@ -1317,6 +1385,9 @@ interface SignalRequests {
1317
1385
  set_lock: {
1318
1386
  locked: boolean;
1319
1387
  };
1388
+ start_room_integration: StartRoomIntegrationRequest;
1389
+ stop_room_integration: StopRoomIntegrationRequest;
1390
+ update_room_integration_props: UpdateRoomIntegrationPropsRequest;
1320
1391
  start_live_transcription: void;
1321
1392
  start_recording: {
1322
1393
  recording: string;
@@ -1508,6 +1579,9 @@ declare const PROTOCOL_RESPONSES: {
1508
1579
  PLAY_CLIENT_STICKER: string;
1509
1580
  ROOM_INTEGRATION_ENABLED: string;
1510
1581
  ROOM_INTEGRATION_DISABLED: string;
1582
+ ROOM_INTEGRATION_STARTED: string;
1583
+ ROOM_INTEGRATION_STOPPED: string;
1584
+ ROOM_INTEGRATION_PROPS_UPDATED: string;
1511
1585
  ROOM_JOINED: string;
1512
1586
  ROOM_KNOCKED: string;
1513
1587
  ROOM_LEFT: string;
@@ -2072,6 +2146,7 @@ declare class VegaRtcManager implements RtcManager {
2072
2146
  _sndTransportIceRestartPromise: any;
2073
2147
  _rcvTransportIceRestartPromise: any;
2074
2148
  _colocation: any;
2149
+ _isAudioOnlyMode: boolean;
2075
2150
  _audioTrackOnEnded: any;
2076
2151
  _videoTrackOnEnded: any;
2077
2152
  _socketListenerDeregisterFunctions: any;
@@ -2247,5 +2322,5 @@ declare class VegaRtcManager implements RtcManager {
2247
2322
  hasClient(clientId: string): boolean;
2248
2323
  }
2249
2324
 
2250
- export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
2251
- export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdateRequest, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatFileShare, ChatMessage, ChatMessageError, ChatMessageRemoved, ChatMessageRequest, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, FileShareErrorCode, FileUploadUrl, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetInitialStreamOptions, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, GetUserMediaAttempt, GetUserMediaAttemptOutcome, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, KnockResponse, KnockResponseSender, KnockRoomRequest, KnockerLeftEvent, LiveCaptionEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, MediaPrefs, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareEnableRequest, ScreenshareEnableRequestedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaConnectionOptions, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
2325
+ export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ROOM_INTEGRATION_ERROR_CODES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, isRoomIntegrationErrorCode, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
2326
+ export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdateRequest, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatFileShare, ChatMessage, ChatMessageError, ChatMessageRemoved, ChatMessageRequest, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, FileShareErrorCode, FileUploadUrl, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetInitialStreamOptions, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, GetUserMediaAttempt, GetUserMediaAttemptOutcome, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, KnockResponse, KnockResponseSender, KnockRoomRequest, KnockerLeftEvent, LiveCaptionEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, MediaPrefs, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomIntegrationDisabledEvent, RoomIntegrationEnabledEvent, RoomIntegrationError, RoomIntegrationErrorCode, RoomIntegrationProps, RoomIntegrationPropsUpdatedEvent, RoomIntegrationPropsUpdatedSuccess, RoomIntegrationSessionEvent, RoomIntegrationSessionState, RoomIntegrationStartedEvent, RoomIntegrationStartedSuccess, RoomIntegrationStoppedEvent, RoomIntegrationStoppedSuccess, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareEnableRequest, ScreenshareEnableRequestedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StartRoomIntegrationRequest, StatsMonitorOptions, StatsMonitorState, StatsSubscription, StopRoomIntegrationRequest, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdateRoomIntegrationPropsRequest, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaConnectionOptions, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
package/dist/index.d.mts CHANGED
@@ -531,6 +531,7 @@ interface RtcManager {
531
531
  isSfu: boolean;
532
532
  }): boolean;
533
533
  setEventClaim?(eventClaim: string): void;
534
+ setAudioOnly(audioOnly: boolean): void;
534
535
  setRemoteScreenshareVideoTrackIds(remoteScreenshareVideoTrackIds: string[]): void;
535
536
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
536
537
  removeRemoteClientMediaPrefs(clientId: string): void;
@@ -1072,10 +1073,72 @@ interface RoomJoinedSuccess {
1072
1073
  clientClaim: string;
1073
1074
  breakout?: BreakoutConfig;
1074
1075
  eventClaim: string;
1076
+ roomIntegrationSession?: RoomIntegrationSessionEvent[];
1075
1077
  }
1076
1078
  type RoomJoinedEvent = RoomJoinedErrors | RoomJoinedSuccess;
1077
1079
  interface BreakoutSessionUpdatedEvent extends BreakoutConfig {
1078
1080
  }
1081
+ type RoomIntegrationProps = {
1082
+ [key: string]: string | number | boolean | null;
1083
+ };
1084
+ interface RoomIntegrationSessionState {
1085
+ tagName: string;
1086
+ shareUrl: string;
1087
+ props: RoomIntegrationProps;
1088
+ userId?: string;
1089
+ clientId: string;
1090
+ }
1091
+ interface RoomIntegrationSessionTiming {
1092
+ roomIntegrationSessionStartedAt?: number;
1093
+ }
1094
+ interface RoomIntegrationSessionEvent extends RoomIntegrationSessionState, RoomIntegrationSessionTiming {
1095
+ roomIntegrationId: number | string;
1096
+ roomIntegrationSessionId: string;
1097
+ breakoutGroupId?: string | null;
1098
+ }
1099
+ declare const ROOM_INTEGRATION_ERROR_CODES: readonly ["not_in_a_room", "forbidden", "missing_parameters", "invalid_parameters", "internal_server_error"];
1100
+ type RoomIntegrationErrorCode = (typeof ROOM_INTEGRATION_ERROR_CODES)[number];
1101
+ interface RoomIntegrationError {
1102
+ error: string;
1103
+ }
1104
+ declare function isRoomIntegrationErrorCode(error: string): error is RoomIntegrationErrorCode;
1105
+ interface RoomIntegrationStartedSuccess extends RoomIntegrationSessionTiming {
1106
+ roomIntegrationId: number | string;
1107
+ roomIntegrationSessionId: string;
1108
+ breakoutGroupId?: string | null;
1109
+ state: RoomIntegrationSessionState;
1110
+ }
1111
+ type RoomIntegrationStartedEvent = RoomIntegrationStartedSuccess | RoomIntegrationError;
1112
+ interface RoomIntegrationStoppedSuccess {
1113
+ roomIntegrationSessionId: string;
1114
+ intent?: "stop" | "end";
1115
+ clientId?: string;
1116
+ }
1117
+ type RoomIntegrationStoppedEvent = RoomIntegrationStoppedSuccess | RoomIntegrationError;
1118
+ interface RoomIntegrationPropsUpdatedSuccess {
1119
+ roomIntegrationSessionId: string;
1120
+ props: RoomIntegrationProps;
1121
+ }
1122
+ type RoomIntegrationPropsUpdatedEvent = RoomIntegrationPropsUpdatedSuccess | RoomIntegrationError;
1123
+ interface RoomIntegrationEnabledEvent {
1124
+ roomIntegrationId: number | string;
1125
+ }
1126
+ interface RoomIntegrationDisabledEvent {
1127
+ roomIntegrationId: number | string;
1128
+ }
1129
+ interface StartRoomIntegrationRequest {
1130
+ roomIntegrationId: number;
1131
+ breakoutGroupId: string | null;
1132
+ state: RoomIntegrationSessionState;
1133
+ }
1134
+ interface StopRoomIntegrationRequest {
1135
+ roomIntegrationSessionId: string;
1136
+ intent: "stop" | "end";
1137
+ }
1138
+ interface UpdateRoomIntegrationPropsRequest {
1139
+ roomIntegrationSessionId: string;
1140
+ props: RoomIntegrationProps;
1141
+ }
1079
1142
  interface RoomKnockedEvent {
1080
1143
  clientId: string;
1081
1144
  displayName: string | null;
@@ -1183,6 +1246,11 @@ interface SignalEvents {
1183
1246
  knock_handled: KnockAcceptedEvent | KnockOnHoldEvent | KnockRejectedEvent;
1184
1247
  knocker_left: KnockerLeftEvent;
1185
1248
  new_client: NewClientEvent;
1249
+ room_integration_started: RoomIntegrationStartedEvent;
1250
+ room_integration_stopped: RoomIntegrationStoppedEvent;
1251
+ room_integration_props_updated: RoomIntegrationPropsUpdatedEvent;
1252
+ room_integration_enabled: RoomIntegrationEnabledEvent;
1253
+ room_integration_disabled: RoomIntegrationDisabledEvent;
1186
1254
  room_joined: RoomJoinedEvent;
1187
1255
  room_knocked: RoomKnockedEvent;
1188
1256
  room_left: void;
@@ -1317,6 +1385,9 @@ interface SignalRequests {
1317
1385
  set_lock: {
1318
1386
  locked: boolean;
1319
1387
  };
1388
+ start_room_integration: StartRoomIntegrationRequest;
1389
+ stop_room_integration: StopRoomIntegrationRequest;
1390
+ update_room_integration_props: UpdateRoomIntegrationPropsRequest;
1320
1391
  start_live_transcription: void;
1321
1392
  start_recording: {
1322
1393
  recording: string;
@@ -1508,6 +1579,9 @@ declare const PROTOCOL_RESPONSES: {
1508
1579
  PLAY_CLIENT_STICKER: string;
1509
1580
  ROOM_INTEGRATION_ENABLED: string;
1510
1581
  ROOM_INTEGRATION_DISABLED: string;
1582
+ ROOM_INTEGRATION_STARTED: string;
1583
+ ROOM_INTEGRATION_STOPPED: string;
1584
+ ROOM_INTEGRATION_PROPS_UPDATED: string;
1511
1585
  ROOM_JOINED: string;
1512
1586
  ROOM_KNOCKED: string;
1513
1587
  ROOM_LEFT: string;
@@ -2072,6 +2146,7 @@ declare class VegaRtcManager implements RtcManager {
2072
2146
  _sndTransportIceRestartPromise: any;
2073
2147
  _rcvTransportIceRestartPromise: any;
2074
2148
  _colocation: any;
2149
+ _isAudioOnlyMode: boolean;
2075
2150
  _audioTrackOnEnded: any;
2076
2151
  _videoTrackOnEnded: any;
2077
2152
  _socketListenerDeregisterFunctions: any;
@@ -2247,5 +2322,5 @@ declare class VegaRtcManager implements RtcManager {
2247
2322
  hasClient(clientId: string): boolean;
2248
2323
  }
2249
2324
 
2250
- export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
2251
- export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdateRequest, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatFileShare, ChatMessage, ChatMessageError, ChatMessageRemoved, ChatMessageRequest, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, FileShareErrorCode, FileUploadUrl, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetInitialStreamOptions, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, GetUserMediaAttempt, GetUserMediaAttemptOutcome, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, KnockResponse, KnockResponseSender, KnockRoomRequest, KnockerLeftEvent, LiveCaptionEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, MediaPrefs, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareEnableRequest, ScreenshareEnableRequestedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaConnectionOptions, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
2325
+ export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ROOM_INTEGRATION_ERROR_CODES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, isRoomIntegrationErrorCode, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
2326
+ export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdateRequest, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatFileShare, ChatMessage, ChatMessageError, ChatMessageRemoved, ChatMessageRequest, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, FileShareErrorCode, FileUploadUrl, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetInitialStreamOptions, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, GetUserMediaAttempt, GetUserMediaAttemptOutcome, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, KnockResponse, KnockResponseSender, KnockRoomRequest, KnockerLeftEvent, LiveCaptionEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, MediaPrefs, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomIntegrationDisabledEvent, RoomIntegrationEnabledEvent, RoomIntegrationError, RoomIntegrationErrorCode, RoomIntegrationProps, RoomIntegrationPropsUpdatedEvent, RoomIntegrationPropsUpdatedSuccess, RoomIntegrationSessionEvent, RoomIntegrationSessionState, RoomIntegrationStartedEvent, RoomIntegrationStartedSuccess, RoomIntegrationStoppedEvent, RoomIntegrationStoppedSuccess, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareEnableRequest, ScreenshareEnableRequestedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StartRoomIntegrationRequest, StatsMonitorOptions, StatsMonitorState, StatsSubscription, StopRoomIntegrationRequest, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdateRoomIntegrationPropsRequest, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaConnectionOptions, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
package/dist/index.d.ts CHANGED
@@ -531,6 +531,7 @@ interface RtcManager {
531
531
  isSfu: boolean;
532
532
  }): boolean;
533
533
  setEventClaim?(eventClaim: string): void;
534
+ setAudioOnly(audioOnly: boolean): void;
534
535
  setRemoteScreenshareVideoTrackIds(remoteScreenshareVideoTrackIds: string[]): void;
535
536
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
536
537
  removeRemoteClientMediaPrefs(clientId: string): void;
@@ -1072,10 +1073,72 @@ interface RoomJoinedSuccess {
1072
1073
  clientClaim: string;
1073
1074
  breakout?: BreakoutConfig;
1074
1075
  eventClaim: string;
1076
+ roomIntegrationSession?: RoomIntegrationSessionEvent[];
1075
1077
  }
1076
1078
  type RoomJoinedEvent = RoomJoinedErrors | RoomJoinedSuccess;
1077
1079
  interface BreakoutSessionUpdatedEvent extends BreakoutConfig {
1078
1080
  }
1081
+ type RoomIntegrationProps = {
1082
+ [key: string]: string | number | boolean | null;
1083
+ };
1084
+ interface RoomIntegrationSessionState {
1085
+ tagName: string;
1086
+ shareUrl: string;
1087
+ props: RoomIntegrationProps;
1088
+ userId?: string;
1089
+ clientId: string;
1090
+ }
1091
+ interface RoomIntegrationSessionTiming {
1092
+ roomIntegrationSessionStartedAt?: number;
1093
+ }
1094
+ interface RoomIntegrationSessionEvent extends RoomIntegrationSessionState, RoomIntegrationSessionTiming {
1095
+ roomIntegrationId: number | string;
1096
+ roomIntegrationSessionId: string;
1097
+ breakoutGroupId?: string | null;
1098
+ }
1099
+ declare const ROOM_INTEGRATION_ERROR_CODES: readonly ["not_in_a_room", "forbidden", "missing_parameters", "invalid_parameters", "internal_server_error"];
1100
+ type RoomIntegrationErrorCode = (typeof ROOM_INTEGRATION_ERROR_CODES)[number];
1101
+ interface RoomIntegrationError {
1102
+ error: string;
1103
+ }
1104
+ declare function isRoomIntegrationErrorCode(error: string): error is RoomIntegrationErrorCode;
1105
+ interface RoomIntegrationStartedSuccess extends RoomIntegrationSessionTiming {
1106
+ roomIntegrationId: number | string;
1107
+ roomIntegrationSessionId: string;
1108
+ breakoutGroupId?: string | null;
1109
+ state: RoomIntegrationSessionState;
1110
+ }
1111
+ type RoomIntegrationStartedEvent = RoomIntegrationStartedSuccess | RoomIntegrationError;
1112
+ interface RoomIntegrationStoppedSuccess {
1113
+ roomIntegrationSessionId: string;
1114
+ intent?: "stop" | "end";
1115
+ clientId?: string;
1116
+ }
1117
+ type RoomIntegrationStoppedEvent = RoomIntegrationStoppedSuccess | RoomIntegrationError;
1118
+ interface RoomIntegrationPropsUpdatedSuccess {
1119
+ roomIntegrationSessionId: string;
1120
+ props: RoomIntegrationProps;
1121
+ }
1122
+ type RoomIntegrationPropsUpdatedEvent = RoomIntegrationPropsUpdatedSuccess | RoomIntegrationError;
1123
+ interface RoomIntegrationEnabledEvent {
1124
+ roomIntegrationId: number | string;
1125
+ }
1126
+ interface RoomIntegrationDisabledEvent {
1127
+ roomIntegrationId: number | string;
1128
+ }
1129
+ interface StartRoomIntegrationRequest {
1130
+ roomIntegrationId: number;
1131
+ breakoutGroupId: string | null;
1132
+ state: RoomIntegrationSessionState;
1133
+ }
1134
+ interface StopRoomIntegrationRequest {
1135
+ roomIntegrationSessionId: string;
1136
+ intent: "stop" | "end";
1137
+ }
1138
+ interface UpdateRoomIntegrationPropsRequest {
1139
+ roomIntegrationSessionId: string;
1140
+ props: RoomIntegrationProps;
1141
+ }
1079
1142
  interface RoomKnockedEvent {
1080
1143
  clientId: string;
1081
1144
  displayName: string | null;
@@ -1183,6 +1246,11 @@ interface SignalEvents {
1183
1246
  knock_handled: KnockAcceptedEvent | KnockOnHoldEvent | KnockRejectedEvent;
1184
1247
  knocker_left: KnockerLeftEvent;
1185
1248
  new_client: NewClientEvent;
1249
+ room_integration_started: RoomIntegrationStartedEvent;
1250
+ room_integration_stopped: RoomIntegrationStoppedEvent;
1251
+ room_integration_props_updated: RoomIntegrationPropsUpdatedEvent;
1252
+ room_integration_enabled: RoomIntegrationEnabledEvent;
1253
+ room_integration_disabled: RoomIntegrationDisabledEvent;
1186
1254
  room_joined: RoomJoinedEvent;
1187
1255
  room_knocked: RoomKnockedEvent;
1188
1256
  room_left: void;
@@ -1317,6 +1385,9 @@ interface SignalRequests {
1317
1385
  set_lock: {
1318
1386
  locked: boolean;
1319
1387
  };
1388
+ start_room_integration: StartRoomIntegrationRequest;
1389
+ stop_room_integration: StopRoomIntegrationRequest;
1390
+ update_room_integration_props: UpdateRoomIntegrationPropsRequest;
1320
1391
  start_live_transcription: void;
1321
1392
  start_recording: {
1322
1393
  recording: string;
@@ -1508,6 +1579,9 @@ declare const PROTOCOL_RESPONSES: {
1508
1579
  PLAY_CLIENT_STICKER: string;
1509
1580
  ROOM_INTEGRATION_ENABLED: string;
1510
1581
  ROOM_INTEGRATION_DISABLED: string;
1582
+ ROOM_INTEGRATION_STARTED: string;
1583
+ ROOM_INTEGRATION_STOPPED: string;
1584
+ ROOM_INTEGRATION_PROPS_UPDATED: string;
1511
1585
  ROOM_JOINED: string;
1512
1586
  ROOM_KNOCKED: string;
1513
1587
  ROOM_LEFT: string;
@@ -2072,6 +2146,7 @@ declare class VegaRtcManager implements RtcManager {
2072
2146
  _sndTransportIceRestartPromise: any;
2073
2147
  _rcvTransportIceRestartPromise: any;
2074
2148
  _colocation: any;
2149
+ _isAudioOnlyMode: boolean;
2075
2150
  _audioTrackOnEnded: any;
2076
2151
  _videoTrackOnEnded: any;
2077
2152
  _socketListenerDeregisterFunctions: any;
@@ -2247,5 +2322,5 @@ declare class VegaRtcManager implements RtcManager {
2247
2322
  hasClient(clientId: string): boolean;
2248
2323
  }
2249
2324
 
2250
- export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
2251
- export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdateRequest, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatFileShare, ChatMessage, ChatMessageError, ChatMessageRemoved, ChatMessageRequest, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, FileShareErrorCode, FileUploadUrl, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetInitialStreamOptions, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, GetUserMediaAttempt, GetUserMediaAttemptOutcome, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, KnockResponse, KnockResponseSender, KnockRoomRequest, KnockerLeftEvent, LiveCaptionEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, MediaPrefs, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareEnableRequest, ScreenshareEnableRequestedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaConnectionOptions, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
2325
+ export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ROOM_INTEGRATION_ERROR_CODES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, isRoomIntegrationErrorCode, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
2326
+ export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdateRequest, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatFileShare, ChatMessage, ChatMessageError, ChatMessageRemoved, ChatMessageRequest, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, FileShareErrorCode, FileUploadUrl, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetInitialStreamOptions, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, GetUserMediaAttempt, GetUserMediaAttemptOutcome, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, KnockResponse, KnockResponseSender, KnockRoomRequest, KnockerLeftEvent, LiveCaptionEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, MediaPrefs, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomIntegrationDisabledEvent, RoomIntegrationEnabledEvent, RoomIntegrationError, RoomIntegrationErrorCode, RoomIntegrationProps, RoomIntegrationPropsUpdatedEvent, RoomIntegrationPropsUpdatedSuccess, RoomIntegrationSessionEvent, RoomIntegrationSessionState, RoomIntegrationStartedEvent, RoomIntegrationStartedSuccess, RoomIntegrationStoppedEvent, RoomIntegrationStoppedSuccess, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareEnableRequest, ScreenshareEnableRequestedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StartRoomIntegrationRequest, StatsMonitorOptions, StatsMonitorState, StatsSubscription, StopRoomIntegrationRequest, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdateRoomIntegrationPropsRequest, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaConnectionOptions, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
package/dist/index.mjs CHANGED
@@ -815,6 +815,9 @@ const PROTOCOL_RESPONSES = {
815
815
  PLAY_CLIENT_STICKER: "play_client_sticker",
816
816
  ROOM_INTEGRATION_ENABLED: "room_integration_enabled",
817
817
  ROOM_INTEGRATION_DISABLED: "room_integration_disabled",
818
+ ROOM_INTEGRATION_STARTED: "room_integration_started",
819
+ ROOM_INTEGRATION_STOPPED: "room_integration_stopped",
820
+ ROOM_INTEGRATION_PROPS_UPDATED: "room_integration_props_updated",
818
821
  ROOM_JOINED: "room_joined",
819
822
  ROOM_KNOCKED: "room_knocked",
820
823
  ROOM_LEFT: "room_left",
@@ -2388,6 +2391,16 @@ const FILE_SHARE_ERROR_CODES = [
2388
2391
  function isFileShareError(payload) {
2389
2392
  return "error" in payload && FILE_SHARE_ERROR_CODES.includes(payload.error);
2390
2393
  }
2394
+ const ROOM_INTEGRATION_ERROR_CODES = [
2395
+ "not_in_a_room",
2396
+ "forbidden",
2397
+ "missing_parameters",
2398
+ "invalid_parameters",
2399
+ "internal_server_error",
2400
+ ];
2401
+ function isRoomIntegrationErrorCode(error) {
2402
+ return ROOM_INTEGRATION_ERROR_CODES.includes(error);
2403
+ }
2391
2404
 
2392
2405
  const defaultSubdomainPattern = /^(?:([^.]+)[.])?((:?[^.]+[.]){1,}[^.]+)$/;
2393
2406
  const localstackPattern = /^(?:([^.]+)-)?(ip-[^.]*[.](?:hereby[.]dev|rfc1918[.]disappear[.]at)(?::\d+|))$/;
@@ -4368,6 +4381,7 @@ class VegaRtcManager {
4368
4381
  this._sndTransportIceRestartPromise = null;
4369
4382
  this._rcvTransportIceRestartPromise = null;
4370
4383
  this._colocation = null;
4384
+ this._isAudioOnlyMode = false;
4371
4385
  this._audioTrackOnEnded = () => {
4372
4386
  rtcStats.sendEvent("audio_ended", { unloading });
4373
4387
  this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
@@ -4642,6 +4656,8 @@ class VegaRtcManager {
4642
4656
  });
4643
4657
  if (this._colocation)
4644
4658
  this._vegaConnection.message("setColocation", { colocation: this._colocation });
4659
+ if (this._isAudioOnlyMode)
4660
+ this._vegaConnection.message("enableAudioOnly");
4645
4661
  yield Promise.all([this._createTransport(true), this._createTransport(false)]);
4646
4662
  const mediaPromises = [];
4647
4663
  if (this._micTrack && !this._micProducer && !this._micProducerPromise)
@@ -5370,6 +5386,7 @@ class VegaRtcManager {
5370
5386
  }
5371
5387
  setAudioOnly(audioOnly) {
5372
5388
  var _a;
5389
+ this._isAudioOnlyMode = audioOnly;
5373
5390
  (_a = this._vegaConnection) === null || _a === void 0 ? void 0 : _a.message(audioOnly ? "enableAudioOnly" : "disableAudioOnly");
5374
5391
  }
5375
5392
  setRemoteScreenshareVideoTrackIds() { }
@@ -7903,4 +7920,4 @@ var RtcEventNames;
7903
7920
  RtcEventNames["stream_added"] = "stream_added";
7904
7921
  })(RtcEventNames || (RtcEventNames = {}));
7905
7922
 
7906
- export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
7923
+ export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ROOM_INTEGRATION_ERROR_CODES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, isRoomIntegrationErrorCode, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
@@ -815,6 +815,9 @@ const PROTOCOL_RESPONSES = {
815
815
  PLAY_CLIENT_STICKER: "play_client_sticker",
816
816
  ROOM_INTEGRATION_ENABLED: "room_integration_enabled",
817
817
  ROOM_INTEGRATION_DISABLED: "room_integration_disabled",
818
+ ROOM_INTEGRATION_STARTED: "room_integration_started",
819
+ ROOM_INTEGRATION_STOPPED: "room_integration_stopped",
820
+ ROOM_INTEGRATION_PROPS_UPDATED: "room_integration_props_updated",
818
821
  ROOM_JOINED: "room_joined",
819
822
  ROOM_KNOCKED: "room_knocked",
820
823
  ROOM_LEFT: "room_left",
@@ -2388,6 +2391,16 @@ const FILE_SHARE_ERROR_CODES = [
2388
2391
  function isFileShareError(payload) {
2389
2392
  return "error" in payload && FILE_SHARE_ERROR_CODES.includes(payload.error);
2390
2393
  }
2394
+ const ROOM_INTEGRATION_ERROR_CODES = [
2395
+ "not_in_a_room",
2396
+ "forbidden",
2397
+ "missing_parameters",
2398
+ "invalid_parameters",
2399
+ "internal_server_error",
2400
+ ];
2401
+ function isRoomIntegrationErrorCode(error) {
2402
+ return ROOM_INTEGRATION_ERROR_CODES.includes(error);
2403
+ }
2391
2404
 
2392
2405
  const defaultSubdomainPattern = /^(?:([^.]+)[.])?((:?[^.]+[.]){1,}[^.]+)$/;
2393
2406
  const localstackPattern = /^(?:([^.]+)-)?(ip-[^.]*[.](?:hereby[.]dev|rfc1918[.]disappear[.]at)(?::\d+|))$/;
@@ -4368,6 +4381,7 @@ class VegaRtcManager {
4368
4381
  this._sndTransportIceRestartPromise = null;
4369
4382
  this._rcvTransportIceRestartPromise = null;
4370
4383
  this._colocation = null;
4384
+ this._isAudioOnlyMode = false;
4371
4385
  this._audioTrackOnEnded = () => {
4372
4386
  rtcStats.sendEvent("audio_ended", { unloading });
4373
4387
  this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
@@ -4642,6 +4656,8 @@ class VegaRtcManager {
4642
4656
  });
4643
4657
  if (this._colocation)
4644
4658
  this._vegaConnection.message("setColocation", { colocation: this._colocation });
4659
+ if (this._isAudioOnlyMode)
4660
+ this._vegaConnection.message("enableAudioOnly");
4645
4661
  yield Promise.all([this._createTransport(true), this._createTransport(false)]);
4646
4662
  const mediaPromises = [];
4647
4663
  if (this._micTrack && !this._micProducer && !this._micProducerPromise)
@@ -5370,6 +5386,7 @@ class VegaRtcManager {
5370
5386
  }
5371
5387
  setAudioOnly(audioOnly) {
5372
5388
  var _a;
5389
+ this._isAudioOnlyMode = audioOnly;
5373
5390
  (_a = this._vegaConnection) === null || _a === void 0 ? void 0 : _a.message(audioOnly ? "enableAudioOnly" : "disableAudioOnly");
5374
5391
  }
5375
5392
  setRemoteScreenshareVideoTrackIds() { }
@@ -7903,5 +7920,5 @@ var RtcEventNames;
7903
7920
  RtcEventNames["stream_added"] = "stream_added";
7904
7921
  })(RtcEventNames || (RtcEventNames = {}));
7905
7922
 
7906
- export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
7923
+ export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, CAM_SAMPLES_SKIPPED_AFTER_CANDIDATE_PAIR_CHANGE, CONGESTED_FRACTION_LOST, CONGESTED_RTT_INFLATION_MS, EVENTS, FILE_SHARE_ERROR_CODES, INITIAL_CONSUMER_SPATIAL_LAYER, INITIAL_HIGHEST_PREFERRED_LAYER, KNOCK_MESSAGES, KalmanFilter, LOWEST_SVC_LAYER_MAX_BITRATE, Logger, MAX_CONCURRENT_PREFERRED_LAYER_SWITCH_WATCHES, MEDIA_JITTER_BUFFER_TARGET, MIDDLE_SVC_LAYER_MAX_BITRATE, NoDevicesError, P2pRtcManager, PREFERRED_LAYER_SWITCH_POLL_INTERVAL_MS, PREFERRED_LAYER_SWITCH_WATCH_TIMEOUT_MS, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ROOM_INTEGRATION_ERROR_CODES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getInitialStream, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getSelectedCandidatePairId, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isFileShareError, isMobile, isRoomIntegrationErrorCode, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, updateRenderedDimensions, variance };
7907
7924
  //# sourceMappingURL=legacy-esm.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whereby.com/media",
3
3
  "description": "Media library for Whereby",
4
- "version": "11.1.3",
4
+ "version": "11.2.1",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/whereby/sdk",
7
7
  "repository": {