@whereby.com/media 8.3.4 → 9.0.0

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
@@ -576,6 +576,9 @@ class Session {
576
576
  }
577
577
  });
578
578
  }
579
+ expectNewRemoteDescription() {
580
+ this.srdComplete = undefined;
581
+ }
579
582
  _setRemoteDescription(desc) {
580
583
  if (this._deprioritizeH264Encoding)
581
584
  desc.sdp = deprioritizeH264(desc.sdp);
@@ -3338,6 +3341,7 @@ class P2pRtcManager {
3338
3341
  throw e;
3339
3342
  })
3340
3343
  .then(() => {
3344
+ session.expectNewRemoteDescription();
3341
3345
  const message = {
3342
3346
  sdp: offer.sdp,
3343
3347
  sdpU: offer.sdp,
package/dist/index.d.cts CHANGED
@@ -1287,6 +1287,162 @@ declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, cur
1287
1287
  currentSpeakerId?: string | undefined;
1288
1288
  }): GetUpdatedDevicesResult;
1289
1289
 
1290
+ declare const EVENTS: Record<string, keyof RtcEvents>;
1291
+ declare const TYPES: {
1292
+ readonly CONNECTING: "connecting";
1293
+ readonly CONNECTION_FAILED: "connection_failed";
1294
+ readonly CONNECTION_SUCCESSFUL: "connection_successful";
1295
+ readonly CONNECTION_DISCONNECTED: "connection_disconnected";
1296
+ };
1297
+ type ConnectionStatus = (typeof TYPES)[keyof typeof TYPES];
1298
+
1299
+ declare const PROTOCOL_REQUESTS: {
1300
+ BLOCK_CLIENT: string;
1301
+ CANCEL_ROOM_KNOCK: string;
1302
+ CLAIM_ROOM: string;
1303
+ CLEAR_CHAT_HISTORY: string;
1304
+ ENABLE_AUDIO: string;
1305
+ ENABLE_VIDEO: string;
1306
+ END_STREAM: string;
1307
+ FETCH_MEDIASERVER_CONFIG: string;
1308
+ HANDLE_KNOCK: string;
1309
+ IDENTIFY_DEVICE: string;
1310
+ INVITE_CLIENT_AS_MEMBER: string;
1311
+ JOIN_ROOM: string;
1312
+ KICK_CLIENT: string;
1313
+ KNOCK_ROOM: string;
1314
+ LEAVE_ROOM: string;
1315
+ SEND_CLIENT_METADATA: string;
1316
+ SET_LOCK: string;
1317
+ SHARE_MEDIA: string;
1318
+ START_NEW_STREAM: string;
1319
+ START_SCREENSHARE: string;
1320
+ STOP_SCREENSHARE: string;
1321
+ START_URL_EMBED: string;
1322
+ STOP_URL_EMBED: string;
1323
+ START_RECORDING: string;
1324
+ STOP_RECORDING: string;
1325
+ };
1326
+ declare const PROTOCOL_RESPONSES: {
1327
+ AUDIO_ENABLED: string;
1328
+ BACKGROUND_IMAGE_CHANGED: string;
1329
+ BLOCK_ADDED: string;
1330
+ BLOCK_REMOVED: string;
1331
+ CHAT_HISTORY_CLEARED: string;
1332
+ CLIENT_BLOCKED: string;
1333
+ CLIENT_INVITED_AS_MEMBER: string;
1334
+ CLIENT_KICKED: string;
1335
+ CLIENT_LEFT: string;
1336
+ CLIENT_METADATA_RECEIVED: string;
1337
+ CLIENT_READY: string;
1338
+ CLIENT_ROLE_CHANGED: string;
1339
+ CLIENT_USER_ID_CHANGED: string;
1340
+ CONTACTS_UPDATED: string;
1341
+ DEVICE_IDENTIFIED: string;
1342
+ ROOM_ROLES_UPDATED: string;
1343
+ KNOCK_HANDLED: string;
1344
+ KNOCK_PAGE_BACKGROUND_CHANGED: string;
1345
+ KNOCKER_LEFT: string;
1346
+ MEDIASERVER_CONFIG: string;
1347
+ MEDIA_SHARED: string;
1348
+ MEMBER_INVITE: string;
1349
+ NEW_CLIENT: string;
1350
+ NEW_STREAM_STARTED: string;
1351
+ SCREENSHARE_STARTED: string;
1352
+ SCREENSHARE_STOPPED: string;
1353
+ OWNER_NOTIFIED: string;
1354
+ OWNERS_CHANGED: string;
1355
+ PLAY_CLIENT_STICKER: string;
1356
+ ROOM_INTEGRATION_ENABLED: string;
1357
+ ROOM_INTEGRATION_DISABLED: string;
1358
+ ROOM_JOINED: string;
1359
+ ROOM_KNOCKED: string;
1360
+ ROOM_LEFT: string;
1361
+ ROOM_LOCKED: string;
1362
+ ROOM_PERMISSIONS_CHANGED: string;
1363
+ ROOM_LOGO_CHANGED: string;
1364
+ ROOM_TYPE_CHANGED: string;
1365
+ ROOM_MODE_CHANGED: string;
1366
+ SOCKET_USER_ID_CHANGED: string;
1367
+ STICKERS_UNLOCKED: string;
1368
+ STREAM_ENDED: string;
1369
+ URL_EMBED_STARTED: string;
1370
+ URL_EMBED_STOPPED: string;
1371
+ RECORDING_STARTED: string;
1372
+ RECORDING_STOPPED: string;
1373
+ USER_NOTIFIED: string;
1374
+ VIDEO_ENABLED: string;
1375
+ CLIENT_UNABLE_TO_JOIN: string;
1376
+ LIVE_TRANSCRIPTION_STARTED: string;
1377
+ LIVE_TRANSCRIPTION_STOPPED: string;
1378
+ LIVE_CAPTIONS_STARTED: string;
1379
+ LIVE_CAPTIONS_STOPPED: string;
1380
+ };
1381
+ declare const PROTOCOL_ERRORS: {
1382
+ CANNOT_INVITE_YOURSELF: string;
1383
+ CLIENT_BLOCKED: string;
1384
+ CLIENT_MISSING_DEVICE_ID: string;
1385
+ FORBIDDEN: string;
1386
+ FREE_TIER_EXHAUSTED: string;
1387
+ INTERNAL_SERVER_ERROR: string;
1388
+ INVALID_AVATAR: string;
1389
+ INVALID_PARAMETERS: string;
1390
+ INVALID_ROOM_NAME: string;
1391
+ MAX_VIEWER_LIMIT_REACHED: string;
1392
+ MISSING_PARAMETERS: string;
1393
+ MISSING_ROOM_NAME: string;
1394
+ NOT_AN_OWNER: string;
1395
+ NOT_IN_A_ROOM: string;
1396
+ ROOM_ALREADY_CLAIMED: string;
1397
+ ROOM_CONCURRENCY_CONTROL_ERROR: string;
1398
+ ROOM_EMAIL_MISSING: string;
1399
+ ROOM_EMPTY: string;
1400
+ ROOM_FULL: string;
1401
+ ROOM_JOIN_PERMISSION_DENIED: string;
1402
+ ROOM_LOCKED: string;
1403
+ ROOM_MEETING_TIME_EXHAUSTED: string;
1404
+ ROOM_UNCLAIMED: string;
1405
+ TOO_LONG_TEXT: string;
1406
+ UNIQUE_ROLE_ALREADY_IN_ROOM: string;
1407
+ UNSUPPORTED_VIDEO_ENCODING: string;
1408
+ VIDEO_STICKER_DOES_NOT_EXIST: string;
1409
+ VIDEO_STICKER_FORMAT_ERROR: string;
1410
+ };
1411
+ declare const RELAY_MESSAGES: {
1412
+ CHAT_MESSAGE: string;
1413
+ CHAT_READ_STATE: string;
1414
+ CHAT_STATE: string;
1415
+ ICE_CANDIDATE: string;
1416
+ ICE_END_OF_CANDIDATES: string;
1417
+ READY_TO_RECEIVE_OFFER: string;
1418
+ REMOTE_CLIENT_MEDIA_REQUEST: string;
1419
+ SDP_ANSWER: string;
1420
+ SDP_OFFER: string;
1421
+ VIDEO_STICKER: string;
1422
+ };
1423
+ declare const KNOCK_MESSAGES: {
1424
+ actions: {
1425
+ ACCEPT: string;
1426
+ HOLD: string;
1427
+ REJECT: string;
1428
+ };
1429
+ resolutions: {
1430
+ ACCEPTED: string;
1431
+ ON_HOLD: string;
1432
+ REJECTED: string;
1433
+ };
1434
+ };
1435
+ declare const PROTOCOL_EVENTS: {
1436
+ PENDING_CLIENT_LEFT: string;
1437
+ MEDIA_QUALITY_CHANGED: string;
1438
+ };
1439
+
1440
+ declare const CAMERA_STREAM_ID = "0";
1441
+ declare const STREAM_TYPES: {
1442
+ webcam: string;
1443
+ screenshare: string;
1444
+ };
1445
+
1290
1446
  interface P2PSessionOptions {
1291
1447
  clientId: string;
1292
1448
  bandwidth: number;
@@ -1305,7 +1461,7 @@ declare class Session {
1305
1461
  mdnsHostCandidateSeen: boolean;
1306
1462
  pc: RTCPeerConnection;
1307
1463
  wasEverConnected: boolean;
1308
- connectionStatus: any;
1464
+ connectionStatus: ConnectionStatus | null;
1309
1465
  bandwidth: any;
1310
1466
  pending: any[];
1311
1467
  isOperationPending: boolean;
@@ -1316,16 +1472,17 @@ declare class Session {
1316
1472
  registerConnected?: (value: unknown) => void;
1317
1473
  _deprioritizeH264Encoding: boolean;
1318
1474
  _mediaPrefs?: MediaPrefs;
1319
- clientId: any;
1475
+ clientId: string;
1320
1476
  peerConnectionConfig: RTCConfiguration;
1321
- signalingState: any;
1322
- srdComplete: any;
1477
+ signalingState: RTCPeerConnection["signalingState"];
1478
+ srdComplete?: ReturnType<RTCPeerConnection["setRemoteDescription"]>;
1323
1479
  _incrementAnalyticMetric: P2PIncrementAnalyticMetric;
1324
1480
  pendingReplaceTrackActions: (() => Promise<void>)[];
1325
1481
  constructor({ clientId, bandwidth, peerConnectionConfig, deprioritizeH264Encoding, incrementAnalyticMetric, mediaPrefs, }: P2PSessionOptions);
1326
1482
  addStream(stream: MediaStream): void;
1327
1483
  addTrack(track: MediaStreamTrack): void;
1328
1484
  removeStream(stream: MediaStream): void;
1485
+ expectNewRemoteDescription(): void;
1329
1486
  _setRemoteDescription(desc: SignalRTCSessionDescription): Promise<void>;
1330
1487
  handleOffer(offer: SignalRTCSessionDescription): Promise<SignalRTCSessionDescription>;
1331
1488
  handleAnswer(message: SignalRTCSessionDescription): Promise<void>;
@@ -1440,7 +1597,7 @@ declare class P2pRtcManager implements RtcManager {
1440
1597
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
1441
1598
  removeRemoteClientMediaPrefs(clientId: string): void;
1442
1599
  setRoomSessionId(roomSessionId: string): void;
1443
- _setConnectionStatus(session: Session, newStatus: string, clientId: string): void;
1600
+ _setConnectionStatus(session: Session, newStatus: ConnectionStatus, clientId: string): void;
1444
1601
  _setJitterBufferTarget(pc: RTCPeerConnection): void;
1445
1602
  _emitServerEvent(eventName: string, data?: any): void;
1446
1603
  _emit(eventName: string, data?: any): void;
@@ -1859,160 +2016,5 @@ declare class VegaRtcManager implements RtcManager {
1859
2016
  hasClient(clientId: string): boolean;
1860
2017
  }
1861
2018
 
1862
- declare const EVENTS: Record<string, keyof RtcEvents>;
1863
- declare const TYPES: {
1864
- CONNECTING: string;
1865
- CONNECTION_FAILED: string;
1866
- CONNECTION_SUCCESSFUL: string;
1867
- CONNECTION_DISCONNECTED: string;
1868
- };
1869
-
1870
- declare const PROTOCOL_REQUESTS: {
1871
- BLOCK_CLIENT: string;
1872
- CANCEL_ROOM_KNOCK: string;
1873
- CLAIM_ROOM: string;
1874
- CLEAR_CHAT_HISTORY: string;
1875
- ENABLE_AUDIO: string;
1876
- ENABLE_VIDEO: string;
1877
- END_STREAM: string;
1878
- FETCH_MEDIASERVER_CONFIG: string;
1879
- HANDLE_KNOCK: string;
1880
- IDENTIFY_DEVICE: string;
1881
- INVITE_CLIENT_AS_MEMBER: string;
1882
- JOIN_ROOM: string;
1883
- KICK_CLIENT: string;
1884
- KNOCK_ROOM: string;
1885
- LEAVE_ROOM: string;
1886
- SEND_CLIENT_METADATA: string;
1887
- SET_LOCK: string;
1888
- SHARE_MEDIA: string;
1889
- START_NEW_STREAM: string;
1890
- START_SCREENSHARE: string;
1891
- STOP_SCREENSHARE: string;
1892
- START_URL_EMBED: string;
1893
- STOP_URL_EMBED: string;
1894
- START_RECORDING: string;
1895
- STOP_RECORDING: string;
1896
- };
1897
- declare const PROTOCOL_RESPONSES: {
1898
- AUDIO_ENABLED: string;
1899
- BACKGROUND_IMAGE_CHANGED: string;
1900
- BLOCK_ADDED: string;
1901
- BLOCK_REMOVED: string;
1902
- CHAT_HISTORY_CLEARED: string;
1903
- CLIENT_BLOCKED: string;
1904
- CLIENT_INVITED_AS_MEMBER: string;
1905
- CLIENT_KICKED: string;
1906
- CLIENT_LEFT: string;
1907
- CLIENT_METADATA_RECEIVED: string;
1908
- CLIENT_READY: string;
1909
- CLIENT_ROLE_CHANGED: string;
1910
- CLIENT_USER_ID_CHANGED: string;
1911
- CONTACTS_UPDATED: string;
1912
- DEVICE_IDENTIFIED: string;
1913
- ROOM_ROLES_UPDATED: string;
1914
- KNOCK_HANDLED: string;
1915
- KNOCK_PAGE_BACKGROUND_CHANGED: string;
1916
- KNOCKER_LEFT: string;
1917
- MEDIASERVER_CONFIG: string;
1918
- MEDIA_SHARED: string;
1919
- MEMBER_INVITE: string;
1920
- NEW_CLIENT: string;
1921
- NEW_STREAM_STARTED: string;
1922
- SCREENSHARE_STARTED: string;
1923
- SCREENSHARE_STOPPED: string;
1924
- OWNER_NOTIFIED: string;
1925
- OWNERS_CHANGED: string;
1926
- PLAY_CLIENT_STICKER: string;
1927
- ROOM_INTEGRATION_ENABLED: string;
1928
- ROOM_INTEGRATION_DISABLED: string;
1929
- ROOM_JOINED: string;
1930
- ROOM_KNOCKED: string;
1931
- ROOM_LEFT: string;
1932
- ROOM_LOCKED: string;
1933
- ROOM_PERMISSIONS_CHANGED: string;
1934
- ROOM_LOGO_CHANGED: string;
1935
- ROOM_TYPE_CHANGED: string;
1936
- ROOM_MODE_CHANGED: string;
1937
- SOCKET_USER_ID_CHANGED: string;
1938
- STICKERS_UNLOCKED: string;
1939
- STREAM_ENDED: string;
1940
- URL_EMBED_STARTED: string;
1941
- URL_EMBED_STOPPED: string;
1942
- RECORDING_STARTED: string;
1943
- RECORDING_STOPPED: string;
1944
- USER_NOTIFIED: string;
1945
- VIDEO_ENABLED: string;
1946
- CLIENT_UNABLE_TO_JOIN: string;
1947
- LIVE_TRANSCRIPTION_STARTED: string;
1948
- LIVE_TRANSCRIPTION_STOPPED: string;
1949
- LIVE_CAPTIONS_STARTED: string;
1950
- LIVE_CAPTIONS_STOPPED: string;
1951
- };
1952
- declare const PROTOCOL_ERRORS: {
1953
- CANNOT_INVITE_YOURSELF: string;
1954
- CLIENT_BLOCKED: string;
1955
- CLIENT_MISSING_DEVICE_ID: string;
1956
- FORBIDDEN: string;
1957
- FREE_TIER_EXHAUSTED: string;
1958
- INTERNAL_SERVER_ERROR: string;
1959
- INVALID_AVATAR: string;
1960
- INVALID_PARAMETERS: string;
1961
- INVALID_ROOM_NAME: string;
1962
- MAX_VIEWER_LIMIT_REACHED: string;
1963
- MISSING_PARAMETERS: string;
1964
- MISSING_ROOM_NAME: string;
1965
- NOT_AN_OWNER: string;
1966
- NOT_IN_A_ROOM: string;
1967
- ROOM_ALREADY_CLAIMED: string;
1968
- ROOM_CONCURRENCY_CONTROL_ERROR: string;
1969
- ROOM_EMAIL_MISSING: string;
1970
- ROOM_EMPTY: string;
1971
- ROOM_FULL: string;
1972
- ROOM_JOIN_PERMISSION_DENIED: string;
1973
- ROOM_LOCKED: string;
1974
- ROOM_MEETING_TIME_EXHAUSTED: string;
1975
- ROOM_UNCLAIMED: string;
1976
- TOO_LONG_TEXT: string;
1977
- UNIQUE_ROLE_ALREADY_IN_ROOM: string;
1978
- UNSUPPORTED_VIDEO_ENCODING: string;
1979
- VIDEO_STICKER_DOES_NOT_EXIST: string;
1980
- VIDEO_STICKER_FORMAT_ERROR: string;
1981
- };
1982
- declare const RELAY_MESSAGES: {
1983
- CHAT_MESSAGE: string;
1984
- CHAT_READ_STATE: string;
1985
- CHAT_STATE: string;
1986
- ICE_CANDIDATE: string;
1987
- ICE_END_OF_CANDIDATES: string;
1988
- READY_TO_RECEIVE_OFFER: string;
1989
- REMOTE_CLIENT_MEDIA_REQUEST: string;
1990
- SDP_ANSWER: string;
1991
- SDP_OFFER: string;
1992
- VIDEO_STICKER: string;
1993
- };
1994
- declare const KNOCK_MESSAGES: {
1995
- actions: {
1996
- ACCEPT: string;
1997
- HOLD: string;
1998
- REJECT: string;
1999
- };
2000
- resolutions: {
2001
- ACCEPTED: string;
2002
- ON_HOLD: string;
2003
- REJECTED: string;
2004
- };
2005
- };
2006
- declare const PROTOCOL_EVENTS: {
2007
- PENDING_CLIENT_LEFT: string;
2008
- MEDIA_QUALITY_CHANGED: string;
2009
- };
2010
-
2011
- declare const CAMERA_STREAM_ID = "0";
2012
- declare const STREAM_TYPES: {
2013
- webcam: string;
2014
- screenshare: string;
2015
- };
2016
-
2017
2019
  export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, 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, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, variance };
2018
- export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, 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, 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 };
2020
+ export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, 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, 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 };
package/dist/index.d.mts CHANGED
@@ -1287,6 +1287,162 @@ declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, cur
1287
1287
  currentSpeakerId?: string | undefined;
1288
1288
  }): GetUpdatedDevicesResult;
1289
1289
 
1290
+ declare const EVENTS: Record<string, keyof RtcEvents>;
1291
+ declare const TYPES: {
1292
+ readonly CONNECTING: "connecting";
1293
+ readonly CONNECTION_FAILED: "connection_failed";
1294
+ readonly CONNECTION_SUCCESSFUL: "connection_successful";
1295
+ readonly CONNECTION_DISCONNECTED: "connection_disconnected";
1296
+ };
1297
+ type ConnectionStatus = (typeof TYPES)[keyof typeof TYPES];
1298
+
1299
+ declare const PROTOCOL_REQUESTS: {
1300
+ BLOCK_CLIENT: string;
1301
+ CANCEL_ROOM_KNOCK: string;
1302
+ CLAIM_ROOM: string;
1303
+ CLEAR_CHAT_HISTORY: string;
1304
+ ENABLE_AUDIO: string;
1305
+ ENABLE_VIDEO: string;
1306
+ END_STREAM: string;
1307
+ FETCH_MEDIASERVER_CONFIG: string;
1308
+ HANDLE_KNOCK: string;
1309
+ IDENTIFY_DEVICE: string;
1310
+ INVITE_CLIENT_AS_MEMBER: string;
1311
+ JOIN_ROOM: string;
1312
+ KICK_CLIENT: string;
1313
+ KNOCK_ROOM: string;
1314
+ LEAVE_ROOM: string;
1315
+ SEND_CLIENT_METADATA: string;
1316
+ SET_LOCK: string;
1317
+ SHARE_MEDIA: string;
1318
+ START_NEW_STREAM: string;
1319
+ START_SCREENSHARE: string;
1320
+ STOP_SCREENSHARE: string;
1321
+ START_URL_EMBED: string;
1322
+ STOP_URL_EMBED: string;
1323
+ START_RECORDING: string;
1324
+ STOP_RECORDING: string;
1325
+ };
1326
+ declare const PROTOCOL_RESPONSES: {
1327
+ AUDIO_ENABLED: string;
1328
+ BACKGROUND_IMAGE_CHANGED: string;
1329
+ BLOCK_ADDED: string;
1330
+ BLOCK_REMOVED: string;
1331
+ CHAT_HISTORY_CLEARED: string;
1332
+ CLIENT_BLOCKED: string;
1333
+ CLIENT_INVITED_AS_MEMBER: string;
1334
+ CLIENT_KICKED: string;
1335
+ CLIENT_LEFT: string;
1336
+ CLIENT_METADATA_RECEIVED: string;
1337
+ CLIENT_READY: string;
1338
+ CLIENT_ROLE_CHANGED: string;
1339
+ CLIENT_USER_ID_CHANGED: string;
1340
+ CONTACTS_UPDATED: string;
1341
+ DEVICE_IDENTIFIED: string;
1342
+ ROOM_ROLES_UPDATED: string;
1343
+ KNOCK_HANDLED: string;
1344
+ KNOCK_PAGE_BACKGROUND_CHANGED: string;
1345
+ KNOCKER_LEFT: string;
1346
+ MEDIASERVER_CONFIG: string;
1347
+ MEDIA_SHARED: string;
1348
+ MEMBER_INVITE: string;
1349
+ NEW_CLIENT: string;
1350
+ NEW_STREAM_STARTED: string;
1351
+ SCREENSHARE_STARTED: string;
1352
+ SCREENSHARE_STOPPED: string;
1353
+ OWNER_NOTIFIED: string;
1354
+ OWNERS_CHANGED: string;
1355
+ PLAY_CLIENT_STICKER: string;
1356
+ ROOM_INTEGRATION_ENABLED: string;
1357
+ ROOM_INTEGRATION_DISABLED: string;
1358
+ ROOM_JOINED: string;
1359
+ ROOM_KNOCKED: string;
1360
+ ROOM_LEFT: string;
1361
+ ROOM_LOCKED: string;
1362
+ ROOM_PERMISSIONS_CHANGED: string;
1363
+ ROOM_LOGO_CHANGED: string;
1364
+ ROOM_TYPE_CHANGED: string;
1365
+ ROOM_MODE_CHANGED: string;
1366
+ SOCKET_USER_ID_CHANGED: string;
1367
+ STICKERS_UNLOCKED: string;
1368
+ STREAM_ENDED: string;
1369
+ URL_EMBED_STARTED: string;
1370
+ URL_EMBED_STOPPED: string;
1371
+ RECORDING_STARTED: string;
1372
+ RECORDING_STOPPED: string;
1373
+ USER_NOTIFIED: string;
1374
+ VIDEO_ENABLED: string;
1375
+ CLIENT_UNABLE_TO_JOIN: string;
1376
+ LIVE_TRANSCRIPTION_STARTED: string;
1377
+ LIVE_TRANSCRIPTION_STOPPED: string;
1378
+ LIVE_CAPTIONS_STARTED: string;
1379
+ LIVE_CAPTIONS_STOPPED: string;
1380
+ };
1381
+ declare const PROTOCOL_ERRORS: {
1382
+ CANNOT_INVITE_YOURSELF: string;
1383
+ CLIENT_BLOCKED: string;
1384
+ CLIENT_MISSING_DEVICE_ID: string;
1385
+ FORBIDDEN: string;
1386
+ FREE_TIER_EXHAUSTED: string;
1387
+ INTERNAL_SERVER_ERROR: string;
1388
+ INVALID_AVATAR: string;
1389
+ INVALID_PARAMETERS: string;
1390
+ INVALID_ROOM_NAME: string;
1391
+ MAX_VIEWER_LIMIT_REACHED: string;
1392
+ MISSING_PARAMETERS: string;
1393
+ MISSING_ROOM_NAME: string;
1394
+ NOT_AN_OWNER: string;
1395
+ NOT_IN_A_ROOM: string;
1396
+ ROOM_ALREADY_CLAIMED: string;
1397
+ ROOM_CONCURRENCY_CONTROL_ERROR: string;
1398
+ ROOM_EMAIL_MISSING: string;
1399
+ ROOM_EMPTY: string;
1400
+ ROOM_FULL: string;
1401
+ ROOM_JOIN_PERMISSION_DENIED: string;
1402
+ ROOM_LOCKED: string;
1403
+ ROOM_MEETING_TIME_EXHAUSTED: string;
1404
+ ROOM_UNCLAIMED: string;
1405
+ TOO_LONG_TEXT: string;
1406
+ UNIQUE_ROLE_ALREADY_IN_ROOM: string;
1407
+ UNSUPPORTED_VIDEO_ENCODING: string;
1408
+ VIDEO_STICKER_DOES_NOT_EXIST: string;
1409
+ VIDEO_STICKER_FORMAT_ERROR: string;
1410
+ };
1411
+ declare const RELAY_MESSAGES: {
1412
+ CHAT_MESSAGE: string;
1413
+ CHAT_READ_STATE: string;
1414
+ CHAT_STATE: string;
1415
+ ICE_CANDIDATE: string;
1416
+ ICE_END_OF_CANDIDATES: string;
1417
+ READY_TO_RECEIVE_OFFER: string;
1418
+ REMOTE_CLIENT_MEDIA_REQUEST: string;
1419
+ SDP_ANSWER: string;
1420
+ SDP_OFFER: string;
1421
+ VIDEO_STICKER: string;
1422
+ };
1423
+ declare const KNOCK_MESSAGES: {
1424
+ actions: {
1425
+ ACCEPT: string;
1426
+ HOLD: string;
1427
+ REJECT: string;
1428
+ };
1429
+ resolutions: {
1430
+ ACCEPTED: string;
1431
+ ON_HOLD: string;
1432
+ REJECTED: string;
1433
+ };
1434
+ };
1435
+ declare const PROTOCOL_EVENTS: {
1436
+ PENDING_CLIENT_LEFT: string;
1437
+ MEDIA_QUALITY_CHANGED: string;
1438
+ };
1439
+
1440
+ declare const CAMERA_STREAM_ID = "0";
1441
+ declare const STREAM_TYPES: {
1442
+ webcam: string;
1443
+ screenshare: string;
1444
+ };
1445
+
1290
1446
  interface P2PSessionOptions {
1291
1447
  clientId: string;
1292
1448
  bandwidth: number;
@@ -1305,7 +1461,7 @@ declare class Session {
1305
1461
  mdnsHostCandidateSeen: boolean;
1306
1462
  pc: RTCPeerConnection;
1307
1463
  wasEverConnected: boolean;
1308
- connectionStatus: any;
1464
+ connectionStatus: ConnectionStatus | null;
1309
1465
  bandwidth: any;
1310
1466
  pending: any[];
1311
1467
  isOperationPending: boolean;
@@ -1316,16 +1472,17 @@ declare class Session {
1316
1472
  registerConnected?: (value: unknown) => void;
1317
1473
  _deprioritizeH264Encoding: boolean;
1318
1474
  _mediaPrefs?: MediaPrefs;
1319
- clientId: any;
1475
+ clientId: string;
1320
1476
  peerConnectionConfig: RTCConfiguration;
1321
- signalingState: any;
1322
- srdComplete: any;
1477
+ signalingState: RTCPeerConnection["signalingState"];
1478
+ srdComplete?: ReturnType<RTCPeerConnection["setRemoteDescription"]>;
1323
1479
  _incrementAnalyticMetric: P2PIncrementAnalyticMetric;
1324
1480
  pendingReplaceTrackActions: (() => Promise<void>)[];
1325
1481
  constructor({ clientId, bandwidth, peerConnectionConfig, deprioritizeH264Encoding, incrementAnalyticMetric, mediaPrefs, }: P2PSessionOptions);
1326
1482
  addStream(stream: MediaStream): void;
1327
1483
  addTrack(track: MediaStreamTrack): void;
1328
1484
  removeStream(stream: MediaStream): void;
1485
+ expectNewRemoteDescription(): void;
1329
1486
  _setRemoteDescription(desc: SignalRTCSessionDescription): Promise<void>;
1330
1487
  handleOffer(offer: SignalRTCSessionDescription): Promise<SignalRTCSessionDescription>;
1331
1488
  handleAnswer(message: SignalRTCSessionDescription): Promise<void>;
@@ -1440,7 +1597,7 @@ declare class P2pRtcManager implements RtcManager {
1440
1597
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
1441
1598
  removeRemoteClientMediaPrefs(clientId: string): void;
1442
1599
  setRoomSessionId(roomSessionId: string): void;
1443
- _setConnectionStatus(session: Session, newStatus: string, clientId: string): void;
1600
+ _setConnectionStatus(session: Session, newStatus: ConnectionStatus, clientId: string): void;
1444
1601
  _setJitterBufferTarget(pc: RTCPeerConnection): void;
1445
1602
  _emitServerEvent(eventName: string, data?: any): void;
1446
1603
  _emit(eventName: string, data?: any): void;
@@ -1859,160 +2016,5 @@ declare class VegaRtcManager implements RtcManager {
1859
2016
  hasClient(clientId: string): boolean;
1860
2017
  }
1861
2018
 
1862
- declare const EVENTS: Record<string, keyof RtcEvents>;
1863
- declare const TYPES: {
1864
- CONNECTING: string;
1865
- CONNECTION_FAILED: string;
1866
- CONNECTION_SUCCESSFUL: string;
1867
- CONNECTION_DISCONNECTED: string;
1868
- };
1869
-
1870
- declare const PROTOCOL_REQUESTS: {
1871
- BLOCK_CLIENT: string;
1872
- CANCEL_ROOM_KNOCK: string;
1873
- CLAIM_ROOM: string;
1874
- CLEAR_CHAT_HISTORY: string;
1875
- ENABLE_AUDIO: string;
1876
- ENABLE_VIDEO: string;
1877
- END_STREAM: string;
1878
- FETCH_MEDIASERVER_CONFIG: string;
1879
- HANDLE_KNOCK: string;
1880
- IDENTIFY_DEVICE: string;
1881
- INVITE_CLIENT_AS_MEMBER: string;
1882
- JOIN_ROOM: string;
1883
- KICK_CLIENT: string;
1884
- KNOCK_ROOM: string;
1885
- LEAVE_ROOM: string;
1886
- SEND_CLIENT_METADATA: string;
1887
- SET_LOCK: string;
1888
- SHARE_MEDIA: string;
1889
- START_NEW_STREAM: string;
1890
- START_SCREENSHARE: string;
1891
- STOP_SCREENSHARE: string;
1892
- START_URL_EMBED: string;
1893
- STOP_URL_EMBED: string;
1894
- START_RECORDING: string;
1895
- STOP_RECORDING: string;
1896
- };
1897
- declare const PROTOCOL_RESPONSES: {
1898
- AUDIO_ENABLED: string;
1899
- BACKGROUND_IMAGE_CHANGED: string;
1900
- BLOCK_ADDED: string;
1901
- BLOCK_REMOVED: string;
1902
- CHAT_HISTORY_CLEARED: string;
1903
- CLIENT_BLOCKED: string;
1904
- CLIENT_INVITED_AS_MEMBER: string;
1905
- CLIENT_KICKED: string;
1906
- CLIENT_LEFT: string;
1907
- CLIENT_METADATA_RECEIVED: string;
1908
- CLIENT_READY: string;
1909
- CLIENT_ROLE_CHANGED: string;
1910
- CLIENT_USER_ID_CHANGED: string;
1911
- CONTACTS_UPDATED: string;
1912
- DEVICE_IDENTIFIED: string;
1913
- ROOM_ROLES_UPDATED: string;
1914
- KNOCK_HANDLED: string;
1915
- KNOCK_PAGE_BACKGROUND_CHANGED: string;
1916
- KNOCKER_LEFT: string;
1917
- MEDIASERVER_CONFIG: string;
1918
- MEDIA_SHARED: string;
1919
- MEMBER_INVITE: string;
1920
- NEW_CLIENT: string;
1921
- NEW_STREAM_STARTED: string;
1922
- SCREENSHARE_STARTED: string;
1923
- SCREENSHARE_STOPPED: string;
1924
- OWNER_NOTIFIED: string;
1925
- OWNERS_CHANGED: string;
1926
- PLAY_CLIENT_STICKER: string;
1927
- ROOM_INTEGRATION_ENABLED: string;
1928
- ROOM_INTEGRATION_DISABLED: string;
1929
- ROOM_JOINED: string;
1930
- ROOM_KNOCKED: string;
1931
- ROOM_LEFT: string;
1932
- ROOM_LOCKED: string;
1933
- ROOM_PERMISSIONS_CHANGED: string;
1934
- ROOM_LOGO_CHANGED: string;
1935
- ROOM_TYPE_CHANGED: string;
1936
- ROOM_MODE_CHANGED: string;
1937
- SOCKET_USER_ID_CHANGED: string;
1938
- STICKERS_UNLOCKED: string;
1939
- STREAM_ENDED: string;
1940
- URL_EMBED_STARTED: string;
1941
- URL_EMBED_STOPPED: string;
1942
- RECORDING_STARTED: string;
1943
- RECORDING_STOPPED: string;
1944
- USER_NOTIFIED: string;
1945
- VIDEO_ENABLED: string;
1946
- CLIENT_UNABLE_TO_JOIN: string;
1947
- LIVE_TRANSCRIPTION_STARTED: string;
1948
- LIVE_TRANSCRIPTION_STOPPED: string;
1949
- LIVE_CAPTIONS_STARTED: string;
1950
- LIVE_CAPTIONS_STOPPED: string;
1951
- };
1952
- declare const PROTOCOL_ERRORS: {
1953
- CANNOT_INVITE_YOURSELF: string;
1954
- CLIENT_BLOCKED: string;
1955
- CLIENT_MISSING_DEVICE_ID: string;
1956
- FORBIDDEN: string;
1957
- FREE_TIER_EXHAUSTED: string;
1958
- INTERNAL_SERVER_ERROR: string;
1959
- INVALID_AVATAR: string;
1960
- INVALID_PARAMETERS: string;
1961
- INVALID_ROOM_NAME: string;
1962
- MAX_VIEWER_LIMIT_REACHED: string;
1963
- MISSING_PARAMETERS: string;
1964
- MISSING_ROOM_NAME: string;
1965
- NOT_AN_OWNER: string;
1966
- NOT_IN_A_ROOM: string;
1967
- ROOM_ALREADY_CLAIMED: string;
1968
- ROOM_CONCURRENCY_CONTROL_ERROR: string;
1969
- ROOM_EMAIL_MISSING: string;
1970
- ROOM_EMPTY: string;
1971
- ROOM_FULL: string;
1972
- ROOM_JOIN_PERMISSION_DENIED: string;
1973
- ROOM_LOCKED: string;
1974
- ROOM_MEETING_TIME_EXHAUSTED: string;
1975
- ROOM_UNCLAIMED: string;
1976
- TOO_LONG_TEXT: string;
1977
- UNIQUE_ROLE_ALREADY_IN_ROOM: string;
1978
- UNSUPPORTED_VIDEO_ENCODING: string;
1979
- VIDEO_STICKER_DOES_NOT_EXIST: string;
1980
- VIDEO_STICKER_FORMAT_ERROR: string;
1981
- };
1982
- declare const RELAY_MESSAGES: {
1983
- CHAT_MESSAGE: string;
1984
- CHAT_READ_STATE: string;
1985
- CHAT_STATE: string;
1986
- ICE_CANDIDATE: string;
1987
- ICE_END_OF_CANDIDATES: string;
1988
- READY_TO_RECEIVE_OFFER: string;
1989
- REMOTE_CLIENT_MEDIA_REQUEST: string;
1990
- SDP_ANSWER: string;
1991
- SDP_OFFER: string;
1992
- VIDEO_STICKER: string;
1993
- };
1994
- declare const KNOCK_MESSAGES: {
1995
- actions: {
1996
- ACCEPT: string;
1997
- HOLD: string;
1998
- REJECT: string;
1999
- };
2000
- resolutions: {
2001
- ACCEPTED: string;
2002
- ON_HOLD: string;
2003
- REJECTED: string;
2004
- };
2005
- };
2006
- declare const PROTOCOL_EVENTS: {
2007
- PENDING_CLIENT_LEFT: string;
2008
- MEDIA_QUALITY_CHANGED: string;
2009
- };
2010
-
2011
- declare const CAMERA_STREAM_ID = "0";
2012
- declare const STREAM_TYPES: {
2013
- webcam: string;
2014
- screenshare: string;
2015
- };
2016
-
2017
2019
  export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, 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, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, variance };
2018
- export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, 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, 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 };
2020
+ export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, 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, 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 };
package/dist/index.d.ts CHANGED
@@ -1287,6 +1287,162 @@ declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, cur
1287
1287
  currentSpeakerId?: string | undefined;
1288
1288
  }): GetUpdatedDevicesResult;
1289
1289
 
1290
+ declare const EVENTS: Record<string, keyof RtcEvents>;
1291
+ declare const TYPES: {
1292
+ readonly CONNECTING: "connecting";
1293
+ readonly CONNECTION_FAILED: "connection_failed";
1294
+ readonly CONNECTION_SUCCESSFUL: "connection_successful";
1295
+ readonly CONNECTION_DISCONNECTED: "connection_disconnected";
1296
+ };
1297
+ type ConnectionStatus = (typeof TYPES)[keyof typeof TYPES];
1298
+
1299
+ declare const PROTOCOL_REQUESTS: {
1300
+ BLOCK_CLIENT: string;
1301
+ CANCEL_ROOM_KNOCK: string;
1302
+ CLAIM_ROOM: string;
1303
+ CLEAR_CHAT_HISTORY: string;
1304
+ ENABLE_AUDIO: string;
1305
+ ENABLE_VIDEO: string;
1306
+ END_STREAM: string;
1307
+ FETCH_MEDIASERVER_CONFIG: string;
1308
+ HANDLE_KNOCK: string;
1309
+ IDENTIFY_DEVICE: string;
1310
+ INVITE_CLIENT_AS_MEMBER: string;
1311
+ JOIN_ROOM: string;
1312
+ KICK_CLIENT: string;
1313
+ KNOCK_ROOM: string;
1314
+ LEAVE_ROOM: string;
1315
+ SEND_CLIENT_METADATA: string;
1316
+ SET_LOCK: string;
1317
+ SHARE_MEDIA: string;
1318
+ START_NEW_STREAM: string;
1319
+ START_SCREENSHARE: string;
1320
+ STOP_SCREENSHARE: string;
1321
+ START_URL_EMBED: string;
1322
+ STOP_URL_EMBED: string;
1323
+ START_RECORDING: string;
1324
+ STOP_RECORDING: string;
1325
+ };
1326
+ declare const PROTOCOL_RESPONSES: {
1327
+ AUDIO_ENABLED: string;
1328
+ BACKGROUND_IMAGE_CHANGED: string;
1329
+ BLOCK_ADDED: string;
1330
+ BLOCK_REMOVED: string;
1331
+ CHAT_HISTORY_CLEARED: string;
1332
+ CLIENT_BLOCKED: string;
1333
+ CLIENT_INVITED_AS_MEMBER: string;
1334
+ CLIENT_KICKED: string;
1335
+ CLIENT_LEFT: string;
1336
+ CLIENT_METADATA_RECEIVED: string;
1337
+ CLIENT_READY: string;
1338
+ CLIENT_ROLE_CHANGED: string;
1339
+ CLIENT_USER_ID_CHANGED: string;
1340
+ CONTACTS_UPDATED: string;
1341
+ DEVICE_IDENTIFIED: string;
1342
+ ROOM_ROLES_UPDATED: string;
1343
+ KNOCK_HANDLED: string;
1344
+ KNOCK_PAGE_BACKGROUND_CHANGED: string;
1345
+ KNOCKER_LEFT: string;
1346
+ MEDIASERVER_CONFIG: string;
1347
+ MEDIA_SHARED: string;
1348
+ MEMBER_INVITE: string;
1349
+ NEW_CLIENT: string;
1350
+ NEW_STREAM_STARTED: string;
1351
+ SCREENSHARE_STARTED: string;
1352
+ SCREENSHARE_STOPPED: string;
1353
+ OWNER_NOTIFIED: string;
1354
+ OWNERS_CHANGED: string;
1355
+ PLAY_CLIENT_STICKER: string;
1356
+ ROOM_INTEGRATION_ENABLED: string;
1357
+ ROOM_INTEGRATION_DISABLED: string;
1358
+ ROOM_JOINED: string;
1359
+ ROOM_KNOCKED: string;
1360
+ ROOM_LEFT: string;
1361
+ ROOM_LOCKED: string;
1362
+ ROOM_PERMISSIONS_CHANGED: string;
1363
+ ROOM_LOGO_CHANGED: string;
1364
+ ROOM_TYPE_CHANGED: string;
1365
+ ROOM_MODE_CHANGED: string;
1366
+ SOCKET_USER_ID_CHANGED: string;
1367
+ STICKERS_UNLOCKED: string;
1368
+ STREAM_ENDED: string;
1369
+ URL_EMBED_STARTED: string;
1370
+ URL_EMBED_STOPPED: string;
1371
+ RECORDING_STARTED: string;
1372
+ RECORDING_STOPPED: string;
1373
+ USER_NOTIFIED: string;
1374
+ VIDEO_ENABLED: string;
1375
+ CLIENT_UNABLE_TO_JOIN: string;
1376
+ LIVE_TRANSCRIPTION_STARTED: string;
1377
+ LIVE_TRANSCRIPTION_STOPPED: string;
1378
+ LIVE_CAPTIONS_STARTED: string;
1379
+ LIVE_CAPTIONS_STOPPED: string;
1380
+ };
1381
+ declare const PROTOCOL_ERRORS: {
1382
+ CANNOT_INVITE_YOURSELF: string;
1383
+ CLIENT_BLOCKED: string;
1384
+ CLIENT_MISSING_DEVICE_ID: string;
1385
+ FORBIDDEN: string;
1386
+ FREE_TIER_EXHAUSTED: string;
1387
+ INTERNAL_SERVER_ERROR: string;
1388
+ INVALID_AVATAR: string;
1389
+ INVALID_PARAMETERS: string;
1390
+ INVALID_ROOM_NAME: string;
1391
+ MAX_VIEWER_LIMIT_REACHED: string;
1392
+ MISSING_PARAMETERS: string;
1393
+ MISSING_ROOM_NAME: string;
1394
+ NOT_AN_OWNER: string;
1395
+ NOT_IN_A_ROOM: string;
1396
+ ROOM_ALREADY_CLAIMED: string;
1397
+ ROOM_CONCURRENCY_CONTROL_ERROR: string;
1398
+ ROOM_EMAIL_MISSING: string;
1399
+ ROOM_EMPTY: string;
1400
+ ROOM_FULL: string;
1401
+ ROOM_JOIN_PERMISSION_DENIED: string;
1402
+ ROOM_LOCKED: string;
1403
+ ROOM_MEETING_TIME_EXHAUSTED: string;
1404
+ ROOM_UNCLAIMED: string;
1405
+ TOO_LONG_TEXT: string;
1406
+ UNIQUE_ROLE_ALREADY_IN_ROOM: string;
1407
+ UNSUPPORTED_VIDEO_ENCODING: string;
1408
+ VIDEO_STICKER_DOES_NOT_EXIST: string;
1409
+ VIDEO_STICKER_FORMAT_ERROR: string;
1410
+ };
1411
+ declare const RELAY_MESSAGES: {
1412
+ CHAT_MESSAGE: string;
1413
+ CHAT_READ_STATE: string;
1414
+ CHAT_STATE: string;
1415
+ ICE_CANDIDATE: string;
1416
+ ICE_END_OF_CANDIDATES: string;
1417
+ READY_TO_RECEIVE_OFFER: string;
1418
+ REMOTE_CLIENT_MEDIA_REQUEST: string;
1419
+ SDP_ANSWER: string;
1420
+ SDP_OFFER: string;
1421
+ VIDEO_STICKER: string;
1422
+ };
1423
+ declare const KNOCK_MESSAGES: {
1424
+ actions: {
1425
+ ACCEPT: string;
1426
+ HOLD: string;
1427
+ REJECT: string;
1428
+ };
1429
+ resolutions: {
1430
+ ACCEPTED: string;
1431
+ ON_HOLD: string;
1432
+ REJECTED: string;
1433
+ };
1434
+ };
1435
+ declare const PROTOCOL_EVENTS: {
1436
+ PENDING_CLIENT_LEFT: string;
1437
+ MEDIA_QUALITY_CHANGED: string;
1438
+ };
1439
+
1440
+ declare const CAMERA_STREAM_ID = "0";
1441
+ declare const STREAM_TYPES: {
1442
+ webcam: string;
1443
+ screenshare: string;
1444
+ };
1445
+
1290
1446
  interface P2PSessionOptions {
1291
1447
  clientId: string;
1292
1448
  bandwidth: number;
@@ -1305,7 +1461,7 @@ declare class Session {
1305
1461
  mdnsHostCandidateSeen: boolean;
1306
1462
  pc: RTCPeerConnection;
1307
1463
  wasEverConnected: boolean;
1308
- connectionStatus: any;
1464
+ connectionStatus: ConnectionStatus | null;
1309
1465
  bandwidth: any;
1310
1466
  pending: any[];
1311
1467
  isOperationPending: boolean;
@@ -1316,16 +1472,17 @@ declare class Session {
1316
1472
  registerConnected?: (value: unknown) => void;
1317
1473
  _deprioritizeH264Encoding: boolean;
1318
1474
  _mediaPrefs?: MediaPrefs;
1319
- clientId: any;
1475
+ clientId: string;
1320
1476
  peerConnectionConfig: RTCConfiguration;
1321
- signalingState: any;
1322
- srdComplete: any;
1477
+ signalingState: RTCPeerConnection["signalingState"];
1478
+ srdComplete?: ReturnType<RTCPeerConnection["setRemoteDescription"]>;
1323
1479
  _incrementAnalyticMetric: P2PIncrementAnalyticMetric;
1324
1480
  pendingReplaceTrackActions: (() => Promise<void>)[];
1325
1481
  constructor({ clientId, bandwidth, peerConnectionConfig, deprioritizeH264Encoding, incrementAnalyticMetric, mediaPrefs, }: P2PSessionOptions);
1326
1482
  addStream(stream: MediaStream): void;
1327
1483
  addTrack(track: MediaStreamTrack): void;
1328
1484
  removeStream(stream: MediaStream): void;
1485
+ expectNewRemoteDescription(): void;
1329
1486
  _setRemoteDescription(desc: SignalRTCSessionDescription): Promise<void>;
1330
1487
  handleOffer(offer: SignalRTCSessionDescription): Promise<SignalRTCSessionDescription>;
1331
1488
  handleAnswer(message: SignalRTCSessionDescription): Promise<void>;
@@ -1440,7 +1597,7 @@ declare class P2pRtcManager implements RtcManager {
1440
1597
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
1441
1598
  removeRemoteClientMediaPrefs(clientId: string): void;
1442
1599
  setRoomSessionId(roomSessionId: string): void;
1443
- _setConnectionStatus(session: Session, newStatus: string, clientId: string): void;
1600
+ _setConnectionStatus(session: Session, newStatus: ConnectionStatus, clientId: string): void;
1444
1601
  _setJitterBufferTarget(pc: RTCPeerConnection): void;
1445
1602
  _emitServerEvent(eventName: string, data?: any): void;
1446
1603
  _emit(eventName: string, data?: any): void;
@@ -1859,160 +2016,5 @@ declare class VegaRtcManager implements RtcManager {
1859
2016
  hasClient(clientId: string): boolean;
1860
2017
  }
1861
2018
 
1862
- declare const EVENTS: Record<string, keyof RtcEvents>;
1863
- declare const TYPES: {
1864
- CONNECTING: string;
1865
- CONNECTION_FAILED: string;
1866
- CONNECTION_SUCCESSFUL: string;
1867
- CONNECTION_DISCONNECTED: string;
1868
- };
1869
-
1870
- declare const PROTOCOL_REQUESTS: {
1871
- BLOCK_CLIENT: string;
1872
- CANCEL_ROOM_KNOCK: string;
1873
- CLAIM_ROOM: string;
1874
- CLEAR_CHAT_HISTORY: string;
1875
- ENABLE_AUDIO: string;
1876
- ENABLE_VIDEO: string;
1877
- END_STREAM: string;
1878
- FETCH_MEDIASERVER_CONFIG: string;
1879
- HANDLE_KNOCK: string;
1880
- IDENTIFY_DEVICE: string;
1881
- INVITE_CLIENT_AS_MEMBER: string;
1882
- JOIN_ROOM: string;
1883
- KICK_CLIENT: string;
1884
- KNOCK_ROOM: string;
1885
- LEAVE_ROOM: string;
1886
- SEND_CLIENT_METADATA: string;
1887
- SET_LOCK: string;
1888
- SHARE_MEDIA: string;
1889
- START_NEW_STREAM: string;
1890
- START_SCREENSHARE: string;
1891
- STOP_SCREENSHARE: string;
1892
- START_URL_EMBED: string;
1893
- STOP_URL_EMBED: string;
1894
- START_RECORDING: string;
1895
- STOP_RECORDING: string;
1896
- };
1897
- declare const PROTOCOL_RESPONSES: {
1898
- AUDIO_ENABLED: string;
1899
- BACKGROUND_IMAGE_CHANGED: string;
1900
- BLOCK_ADDED: string;
1901
- BLOCK_REMOVED: string;
1902
- CHAT_HISTORY_CLEARED: string;
1903
- CLIENT_BLOCKED: string;
1904
- CLIENT_INVITED_AS_MEMBER: string;
1905
- CLIENT_KICKED: string;
1906
- CLIENT_LEFT: string;
1907
- CLIENT_METADATA_RECEIVED: string;
1908
- CLIENT_READY: string;
1909
- CLIENT_ROLE_CHANGED: string;
1910
- CLIENT_USER_ID_CHANGED: string;
1911
- CONTACTS_UPDATED: string;
1912
- DEVICE_IDENTIFIED: string;
1913
- ROOM_ROLES_UPDATED: string;
1914
- KNOCK_HANDLED: string;
1915
- KNOCK_PAGE_BACKGROUND_CHANGED: string;
1916
- KNOCKER_LEFT: string;
1917
- MEDIASERVER_CONFIG: string;
1918
- MEDIA_SHARED: string;
1919
- MEMBER_INVITE: string;
1920
- NEW_CLIENT: string;
1921
- NEW_STREAM_STARTED: string;
1922
- SCREENSHARE_STARTED: string;
1923
- SCREENSHARE_STOPPED: string;
1924
- OWNER_NOTIFIED: string;
1925
- OWNERS_CHANGED: string;
1926
- PLAY_CLIENT_STICKER: string;
1927
- ROOM_INTEGRATION_ENABLED: string;
1928
- ROOM_INTEGRATION_DISABLED: string;
1929
- ROOM_JOINED: string;
1930
- ROOM_KNOCKED: string;
1931
- ROOM_LEFT: string;
1932
- ROOM_LOCKED: string;
1933
- ROOM_PERMISSIONS_CHANGED: string;
1934
- ROOM_LOGO_CHANGED: string;
1935
- ROOM_TYPE_CHANGED: string;
1936
- ROOM_MODE_CHANGED: string;
1937
- SOCKET_USER_ID_CHANGED: string;
1938
- STICKERS_UNLOCKED: string;
1939
- STREAM_ENDED: string;
1940
- URL_EMBED_STARTED: string;
1941
- URL_EMBED_STOPPED: string;
1942
- RECORDING_STARTED: string;
1943
- RECORDING_STOPPED: string;
1944
- USER_NOTIFIED: string;
1945
- VIDEO_ENABLED: string;
1946
- CLIENT_UNABLE_TO_JOIN: string;
1947
- LIVE_TRANSCRIPTION_STARTED: string;
1948
- LIVE_TRANSCRIPTION_STOPPED: string;
1949
- LIVE_CAPTIONS_STARTED: string;
1950
- LIVE_CAPTIONS_STOPPED: string;
1951
- };
1952
- declare const PROTOCOL_ERRORS: {
1953
- CANNOT_INVITE_YOURSELF: string;
1954
- CLIENT_BLOCKED: string;
1955
- CLIENT_MISSING_DEVICE_ID: string;
1956
- FORBIDDEN: string;
1957
- FREE_TIER_EXHAUSTED: string;
1958
- INTERNAL_SERVER_ERROR: string;
1959
- INVALID_AVATAR: string;
1960
- INVALID_PARAMETERS: string;
1961
- INVALID_ROOM_NAME: string;
1962
- MAX_VIEWER_LIMIT_REACHED: string;
1963
- MISSING_PARAMETERS: string;
1964
- MISSING_ROOM_NAME: string;
1965
- NOT_AN_OWNER: string;
1966
- NOT_IN_A_ROOM: string;
1967
- ROOM_ALREADY_CLAIMED: string;
1968
- ROOM_CONCURRENCY_CONTROL_ERROR: string;
1969
- ROOM_EMAIL_MISSING: string;
1970
- ROOM_EMPTY: string;
1971
- ROOM_FULL: string;
1972
- ROOM_JOIN_PERMISSION_DENIED: string;
1973
- ROOM_LOCKED: string;
1974
- ROOM_MEETING_TIME_EXHAUSTED: string;
1975
- ROOM_UNCLAIMED: string;
1976
- TOO_LONG_TEXT: string;
1977
- UNIQUE_ROLE_ALREADY_IN_ROOM: string;
1978
- UNSUPPORTED_VIDEO_ENCODING: string;
1979
- VIDEO_STICKER_DOES_NOT_EXIST: string;
1980
- VIDEO_STICKER_FORMAT_ERROR: string;
1981
- };
1982
- declare const RELAY_MESSAGES: {
1983
- CHAT_MESSAGE: string;
1984
- CHAT_READ_STATE: string;
1985
- CHAT_STATE: string;
1986
- ICE_CANDIDATE: string;
1987
- ICE_END_OF_CANDIDATES: string;
1988
- READY_TO_RECEIVE_OFFER: string;
1989
- REMOTE_CLIENT_MEDIA_REQUEST: string;
1990
- SDP_ANSWER: string;
1991
- SDP_OFFER: string;
1992
- VIDEO_STICKER: string;
1993
- };
1994
- declare const KNOCK_MESSAGES: {
1995
- actions: {
1996
- ACCEPT: string;
1997
- HOLD: string;
1998
- REJECT: string;
1999
- };
2000
- resolutions: {
2001
- ACCEPTED: string;
2002
- ON_HOLD: string;
2003
- REJECTED: string;
2004
- };
2005
- };
2006
- declare const PROTOCOL_EVENTS: {
2007
- PENDING_CLIENT_LEFT: string;
2008
- MEDIA_QUALITY_CHANGED: string;
2009
- };
2010
-
2011
- declare const CAMERA_STREAM_ID = "0";
2012
- declare const STREAM_TYPES: {
2013
- webcam: string;
2014
- screenshare: string;
2015
- };
2016
-
2017
2019
  export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, 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, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, issueDetectorOrMetricEnabled, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, variance };
2018
- export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, 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, 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 };
2020
+ export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, ConnectionStatus, Credentials, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, 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, 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 };
package/dist/index.mjs CHANGED
@@ -555,6 +555,9 @@ class Session {
555
555
  }
556
556
  });
557
557
  }
558
+ expectNewRemoteDescription() {
559
+ this.srdComplete = undefined;
560
+ }
558
561
  _setRemoteDescription(desc) {
559
562
  if (this._deprioritizeH264Encoding)
560
563
  desc.sdp = deprioritizeH264(desc.sdp);
@@ -3317,6 +3320,7 @@ class P2pRtcManager {
3317
3320
  throw e;
3318
3321
  })
3319
3322
  .then(() => {
3323
+ session.expectNewRemoteDescription();
3320
3324
  const message = {
3321
3325
  sdp: offer.sdp,
3322
3326
  sdpU: offer.sdp,
@@ -555,6 +555,9 @@ class Session {
555
555
  }
556
556
  });
557
557
  }
558
+ expectNewRemoteDescription() {
559
+ this.srdComplete = undefined;
560
+ }
558
561
  _setRemoteDescription(desc) {
559
562
  if (this._deprioritizeH264Encoding)
560
563
  desc.sdp = deprioritizeH264(desc.sdp);
@@ -3317,6 +3320,7 @@ class P2pRtcManager {
3317
3320
  throw e;
3318
3321
  })
3319
3322
  .then(() => {
3323
+ session.expectNewRemoteDescription();
3320
3324
  const message = {
3321
3325
  sdp: offer.sdp,
3322
3326
  sdpU: offer.sdp,
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": "8.3.4",
4
+ "version": "9.0.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/whereby/sdk",
7
7
  "repository": {
@@ -68,7 +68,7 @@
68
68
  "@whereby.com/tsconfig": "0.1.0"
69
69
  },
70
70
  "engines": {
71
- "node": ">=16.0.0"
71
+ "node": ">=24.0.0"
72
72
  },
73
73
  "prettier": "@whereby.com/prettier-config",
74
74
  "scripts": {