@webex/web-client-media-engine 3.20.4 → 3.22.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.
@@ -1,5 +1,5 @@
1
- import { LocalStream, ConnectionState, media } from '@webex/webrtc-core';
2
- export { AudioDeviceConstraints, ConnectionState, LocalCameraStream, LocalDisplayStream, LocalMicrophoneStream, LocalStream, LocalStreamEventNames, LocalSystemAudioStream, MediaStreamTrackKind, PeerConnection, RemoteMediaState, RemoteStream, RemoteStreamEventNames, StreamEventNames, VideoContentHint, VideoDeviceConstraints, Logger as WebRtcCoreLogger, WebrtcCoreError, WebrtcCoreErrorType, createCameraStream, createDisplayStream, createDisplayStreamWithAudio, createMicrophoneStream, getAudioInputDevices, getAudioOutputDevices, getDevices, getVideoInputDevices, setOnDeviceChangeHandler } from '@webex/webrtc-core';
1
+ import { LocalStream, ConnectionState, ConnectionType, media } from '@webex/webrtc-core';
2
+ export { AudioDeviceConstraints, ConnectionState, ConnectionType, LocalCameraStream, LocalDisplayStream, LocalMicrophoneStream, LocalStream, LocalStreamEventNames, LocalSystemAudioStream, MediaStreamTrackKind, PeerConnection, RemoteMediaState, RemoteStream, RemoteStreamEventNames, StreamEventNames, VideoContentHint, VideoDeviceConstraints, Logger as WebRtcCoreLogger, WebrtcCoreError, WebrtcCoreErrorType, createCameraStream, createDisplayStream, createDisplayStreamWithAudio, createMicrophoneStream, getAudioInputDevices, getAudioOutputDevices, getDevices, getVideoInputDevices, setOnDeviceChangeHandler } from '@webex/webrtc-core';
3
3
  import { StreamId, StreamState, MediaContent, NamedMediaGroup, MediaType, Policy, PolicySpecificInfo, CodecInfo, StreamRequest as StreamRequest$1 } from '@webex/json-multistream';
4
4
  export { ActiveSpeakerInfo, CodecInfo, H264Codec, Logger as JMPLogger, MediaContent, MediaFamily, MediaType, NamedMediaGroup, Policy, PolicySpecificInfo, ReceiverSelectedInfo, StreamState, getMediaContent, getMediaFamily, getMediaType } from '@webex/json-multistream';
5
5
  import { LogData } from '@webex/rtcstats';
@@ -15,7 +15,7 @@ declare enum MediaCodecMimeType {
15
15
  AV1 = "video/AV1",
16
16
  OPUS = "audio/opus"
17
17
  }
18
- declare type EncodingParams = {
18
+ type EncodingParams = {
19
19
  maxPayloadBitsPerSecond?: number;
20
20
  maxFs?: number;
21
21
  maxWidth?: number;
@@ -58,9 +58,9 @@ declare enum OveruseState {
58
58
  OVERUSED = 1
59
59
  }
60
60
 
61
- declare type OveruseUpdateCallback = (state: OveruseState) => void;
61
+ type OveruseUpdateCallback = (state: OveruseState) => void;
62
62
 
63
- declare type ReceiveSlotId = StreamId;
63
+ type ReceiveSlotId = StreamId;
64
64
  declare function compareReceiveSlotIds(id1: ReceiveSlotId, id2: ReceiveSlotId): boolean;
65
65
  declare enum ReceiveSlotEvents {
66
66
  MediaStarted = "media-started",
@@ -110,7 +110,7 @@ declare class EgressSdpMunger {
110
110
  deleteCodecParameters(parameters: string[]): void;
111
111
  }
112
112
 
113
- declare type StatsMap = Map<string, any>;
113
+ type StatsMap = Map<string, any>;
114
114
 
115
115
  declare abstract class Transceiver {
116
116
  protected _rtcRtpTransceiver: RTCRtpTransceiver;
@@ -225,35 +225,39 @@ interface TransceiverStats {
225
225
  };
226
226
  }
227
227
 
228
- declare type BundlePolicy = 'max-bundle' | 'max-compat';
228
+ type BundlePolicy = 'max-bundle' | 'max-compat';
229
229
 
230
- declare type MetricsCallback = (logData: LogData) => void;
230
+ type MetricsCallback = (logData: LogData) => void;
231
231
 
232
232
  declare enum MultistreamConnectionEventNames {
233
233
  VideoSourceCountUpdate = "video-source-count-update",
234
234
  AudioSourceCountUpdate = "audio-source-count-update",
235
235
  ActiveSpeakerNotification = "active-speaker-notification",
236
- ConnectionStateUpdate = "connection-state-update",
236
+ PeerConnectionStateUpdate = "peer-connection-state-update",
237
+ IceConnectionStateUpdate = "ice-connection-state-update",
237
238
  IceGatheringStateUpdate = "ice-gathering-state-update",
238
239
  NegotiationNeeded = "negotiation-needed",
239
240
  CreateOfferOnSuccess = "createofferonsuccess",
240
241
  CreateAnswerOnSuccess = "createansweronsuccess",
241
242
  SetLocalDescriptionOnSuccess = "setlocaldescriptiononsuccess",
242
- SetRemoteDescriptionOnSuccess = "setremotedescriptiononsuccess"
243
+ SetRemoteDescriptionOnSuccess = "setremotedescriptiononsuccess",
244
+ IceCandidateError = "icecandidateerror"
243
245
  }
244
246
  interface MultistreamConnectionEvents extends EventMap {
245
247
  [MultistreamConnectionEventNames.ActiveSpeakerNotification]: (csis: number[]) => void;
246
248
  [MultistreamConnectionEventNames.VideoSourceCountUpdate]: (numTotalSources: number, numLiveSources: number, mediaContent: MediaContent) => void;
247
249
  [MultistreamConnectionEventNames.AudioSourceCountUpdate]: (numTotalSources: number, numLiveSources: number, mediaContent: MediaContent) => void;
248
- [MultistreamConnectionEventNames.ConnectionStateUpdate]: (state: ConnectionState) => void;
250
+ [MultistreamConnectionEventNames.PeerConnectionStateUpdate]: (state: RTCPeerConnectionState) => void;
251
+ [MultistreamConnectionEventNames.IceConnectionStateUpdate]: (state: RTCIceConnectionState) => void;
249
252
  [MultistreamConnectionEventNames.IceGatheringStateUpdate]: (state: RTCIceGatheringState) => void;
250
253
  [MultistreamConnectionEventNames.NegotiationNeeded]: () => void;
251
254
  [MultistreamConnectionEventNames.CreateAnswerOnSuccess]: (answer: RTCSessionDescriptionInit) => void;
252
255
  [MultistreamConnectionEventNames.CreateOfferOnSuccess]: (offer: RTCSessionDescriptionInit) => void;
253
256
  [MultistreamConnectionEventNames.SetLocalDescriptionOnSuccess]: (description: RTCSessionDescriptionInit) => void;
254
257
  [MultistreamConnectionEventNames.SetRemoteDescriptionOnSuccess]: (description: RTCSessionDescriptionInit) => void;
258
+ [MultistreamConnectionEventNames.IceCandidateError]: (error: RTCPeerConnectionIceErrorEvent) => void;
255
259
  }
256
- declare type MultistreamConnectionOptions = {
260
+ type MultistreamConnectionOptions = {
257
261
  disableSimulcast: boolean;
258
262
  bundlePolicy: BundlePolicy;
259
263
  iceServers: RTCIceServer[] | undefined;
@@ -281,6 +285,9 @@ declare class MultistreamConnection extends EventEmitter<MultistreamConnectionEv
281
285
  private initializePeerConnection;
282
286
  private propagatePeerConnectionEvents;
283
287
  getConnectionState(): ConnectionState;
288
+ getPeerConnectionState(): RTCPeerConnectionState;
289
+ getIceConnectionState(): RTCIceConnectionState;
290
+ getCurrentConnectionType(): Promise<ConnectionType>;
284
291
  getIceGatheringState(): RTCIceGatheringState;
285
292
  private getVideoEncodingOptions;
286
293
  private createSendTransceiver;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/web-client-media-engine",
3
- "version": "3.20.4",
3
+ "version": "3.22.0",
4
4
  "description": "Web Client Media Engine is common web code for interacting with the multistream media server.",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/cjs/index.js",
@@ -60,7 +60,7 @@
60
60
  "@webex/ts-events": "^1.0.1",
61
61
  "@webex/ts-sdp": "1.6.0",
62
62
  "@webex/web-capabilities": "^1.3.0",
63
- "@webex/webrtc-core": "2.7.0",
63
+ "@webex/webrtc-core": "2.10.0",
64
64
  "@webex/web-media-effects": "^2.15.6",
65
65
  "async": "^3.2.4",
66
66
  "js-logger": "^1.6.1",