sip-connector 29.0.1 → 29.1.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,7 +1,7 @@
1
1
  export { default as ConnectionManager } from './@ConnectionManager';
2
- export { EConnectionStatus, ConnectionStateMachine, EConnectionStateMachineEvents, } from './ConnectionStateMachine';
3
- export { hasNotReadyForConnectionError, createNotReadyForConnectionError } from './utils';
2
+ export { ConnectionStateMachine, EConnectionStateMachineEvents, EConnectionStatus, } from './ConnectionStateMachine';
4
3
  export { EVENT_NAMES as CONNECTION_MANAGER_EVENT_NAMES, createEvents } from './events';
5
- export type { TIceServer, TServerConfig, TParametersConnection, TConnectionConfig } from './types';
6
- export type { TEvents as TConnectionManagerEvents, TEventMap as TConnectionManagerEventMap, } from './events';
7
- export type { TConnectionSnapshot, TConnectionContextMap } from './ConnectionStateMachine';
4
+ export { createNotReadyForConnectionError, hasNotReadyForConnectionError } from './utils';
5
+ export type { TIceServer, TMaxAvailableResolution, TServerConfig, TParametersConnection, TConnectionConfig, } from './types';
6
+ export type { TEventMap as TConnectionManagerEventMap, TEvents as TConnectionManagerEvents, } from './events';
7
+ export type { TConnectionContextMap, TConnectionSnapshot } from './ConnectionStateMachine';
@@ -6,11 +6,16 @@ export type TIceServer = {
6
6
  username?: string;
7
7
  credential?: string;
8
8
  };
9
+ export type TMaxAvailableResolution = {
10
+ width: number;
11
+ height: number;
12
+ };
9
13
  export type TServerConfig = {
10
14
  sipServerUrl: string;
11
15
  sipServerIp: string;
12
16
  remoteAddress: string;
13
17
  iceServers: TIceServer[];
18
+ maxAvailableResolution?: TMaxAvailableResolution;
14
19
  };
15
20
  export type TParametersConnection = TServerConfig & TOptionsExtraHeaders & {
16
21
  displayName: string;
@@ -2,11 +2,12 @@ import { EventEmitterProxy } from 'events-constructor';
2
2
  import { PresentationStateMachine } from './PresentationStateMachine';
3
3
  import { CallManager } from '../CallManager';
4
4
  import { TEventMap } from './events';
5
- import { TContentHint, TOnAddedTransceiver } from './types';
5
+ import { TContentHint, TMaxResolution, TOnAddedTransceiver } from './types';
6
6
  type TPresentationOptions = {
7
7
  isNeedReinvite?: boolean;
8
8
  contentHint?: TContentHint;
9
9
  sendEncodings?: RTCRtpEncodingParameters[];
10
+ maxResolution?: TMaxResolution;
10
11
  onAddedTransceiver?: TOnAddedTransceiver;
11
12
  };
12
13
  export declare const hasCanceledStartPresentationError: (error: unknown) => error is import('repeated-calls').TCanceledError<unknown>;
@@ -24,11 +25,11 @@ declare class PresentationManager extends EventEmitterProxy<TEventMap> {
24
25
  });
25
26
  get isPendingPresentation(): boolean;
26
27
  get isPresentationInProcess(): boolean;
27
- startPresentation(beforeStartPresentation: () => Promise<void>, stream: MediaStream, { isNeedReinvite, contentHint, sendEncodings, onAddedTransceiver }?: TPresentationOptions, options?: {
28
+ startPresentation(beforeStartPresentation: () => Promise<void>, stream: MediaStream, { isNeedReinvite, contentHint, sendEncodings, maxResolution, onAddedTransceiver, }?: TPresentationOptions, options?: {
28
29
  callLimit: number;
29
30
  }): Promise<MediaStream>;
30
31
  stopPresentation(beforeStopPresentation: () => Promise<void>): Promise<MediaStream | undefined>;
31
- updatePresentation(beforeStartPresentation: () => Promise<void>, stream: MediaStream, { contentHint, sendEncodings, onAddedTransceiver }?: TPresentationOptions): Promise<MediaStream | undefined>;
32
+ updatePresentation(beforeStartPresentation: () => Promise<void>, stream: MediaStream, { contentHint, sendEncodings, maxResolution, onAddedTransceiver }?: TPresentationOptions): Promise<MediaStream | undefined>;
32
33
  cancelSendPresentationWithRepeatedCalls(): void;
33
34
  private subscribe;
34
35
  private sendPresentationWithDuplicatedCalls;
@@ -0,0 +1,8 @@
1
+ import { TMaxResolution } from './types';
2
+ type TParameters = {
3
+ stream: MediaStream;
4
+ sendEncodings?: RTCRtpEncodingParameters[];
5
+ maxResolution?: TMaxResolution;
6
+ };
7
+ declare const resolveSendEncodings: ({ stream, sendEncodings, maxResolution, }: TParameters) => RTCRtpEncodingParameters[] | undefined;
8
+ export default resolveSendEncodings;
@@ -1,2 +1,6 @@
1
1
  export type TOnAddedTransceiver = (transceiver: RTCRtpTransceiver, track: MediaStreamTrack, streams: MediaStream[]) => Promise<void>;
2
2
  export type TContentHint = 'motion' | 'detail' | 'text' | 'none';
3
+ export type TMaxResolution = {
4
+ width: number;
5
+ height: number;
6
+ };