@campoint/vxwebrtc 0.0.10 → 0.0.11-alpha

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,3 +1,5 @@
1
+ import { EnumAudioCodecs } from '../browserSupportedAudioCodec';
2
+ import { EnumVideoCodecs } from '../browserSupportedVideoCodec';
1
3
  import { TConstrainULongRange } from './WebRTCStreamConfig';
2
4
  import { TWebRtcH264CodecOptions, TWebRtcVP9CodecOptions } from './CodecsOptions';
3
5
  export declare type OnErrorCallback = (e: Error) => void;
@@ -16,14 +18,11 @@ export interface WebSocketReply {
16
18
  iceCandidates?: RTCIceCandidateInit[];
17
19
  direction: string;
18
20
  }
19
- export declare enum EnumVideoCodec {
20
- H264 = "42e01f"
21
- }
22
21
  export interface MediaInfo {
23
22
  audioBitrate: TConstrainULongRange;
24
- audioCodec: string;
23
+ audioCodec: EnumAudioCodecs[];
25
24
  videoBitrate: TConstrainULongRange;
26
- videoCodec: string;
25
+ videoCodec: EnumVideoCodecs[];
27
26
  videoFrameRate: ConstrainULongRange;
28
27
  h264CodecOptions: TWebRtcH264CodecOptions;
29
28
  vp9CodecOptions: TWebRtcVP9CodecOptions;
@@ -1,6 +1,8 @@
1
1
  export declare enum EnumCodecContentType {
2
- OPUS = "audio/mp4;codecs=\"opus\"",
3
- VORBIS = "audio/ogg;codecs=\"vorbis\"",
2
+ OPUS_WEBM = "audio/webm;codecs=\"opus\"",
3
+ OPUS_MP4 = "audio/mp4;codecs=\"opus\"",
4
+ VORBIS_WEBM = "audio/webm;codecs=\"vorbis\"",
5
+ VORBIS_OGG = "audio/ogg;codecs=\"vorbis\"",
4
6
  H264 = "video/mp4",
5
7
  VP8 = "video/webm;codecs=\"vp8\"",
6
8
  VP9 = "video/webm;codecs=\"vp9\"",
@@ -0,0 +1,6 @@
1
+ /** @see CanPlayTypeResult */
2
+ export declare enum EnumMediaCodecSupported {
3
+ UNKNOWN = "",
4
+ PROBABLY = "probably",
5
+ MAYBE = "maybe"
6
+ }
@@ -0,0 +1 @@
1
+ export declare type TArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
@@ -1,4 +1,4 @@
1
- import { OnErrorCallback, OnStopCallback, StreamInfo, EnumWebSocketConnectionCommand, EnumWebSocketConnectionDirection } from './Types/CommonConnectionTypes';
1
+ import { EnumWebSocketConnectionCommand, EnumWebSocketConnectionDirection, OnErrorCallback, OnStopCallback, StreamInfo } from './Types/CommonConnectionTypes';
2
2
  declare abstract class WebRtcPeerConnection {
3
3
  protected connectionOptions: IWebRtcPeerConnectionOptions;
4
4
  protected wsConnection?: WebSocket;
@@ -9,6 +9,11 @@ declare abstract class WebRtcPeerConnection {
9
9
  protected constructor(connectionOptions: IWebRtcPeerConnectionOptions);
10
10
  protected sendResponse(direction: EnumWebSocketConnectionDirection, command: EnumWebSocketConnectionCommand, description?: RTCSessionDescriptionInit): void;
11
11
  protected connectToWebSocket(): void;
12
+ /**
13
+ * @description iOS gets the [Abnormal Closure](https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/code) error when closing a socket
14
+ * without specifying the reason. We should always send this code.
15
+ */
16
+ protected disconnectFromWebSocket(code?: number): void;
12
17
  protected onError(error: Error): void;
13
18
  start(): void;
14
19
  stop(): void;
@@ -2,12 +2,9 @@ export declare enum EnumAudioCodecs {
2
2
  OPUS = "opus",
3
3
  VORBIS = "vorbis",
4
4
  PCMU = "pcmu",
5
- PCMA = "pcma"
5
+ PCMA = "pcma",
6
+ ISAC = "ISAC",
7
+ G722 = "g722",
8
+ CN = "CN"
6
9
  }
7
- /** @see CanPlayTypeResult */
8
- export declare enum EnumMediaCodecSupported {
9
- UNKNOWN = "",
10
- PROBABLY = "probably",
11
- MAYBE = "maybe"
12
- }
13
- export declare const browserSupportedAudioCodec: (codecs: string[]) => "" | EnumAudioCodecs.OPUS | EnumAudioCodecs.VORBIS;
10
+ export declare const browserSupportedAudioCodec: (codecs: string[]) => EnumAudioCodecs[];
@@ -1,7 +1,9 @@
1
- import { EnumVideoCodec } from './Types/CommonConnectionTypes';
2
1
  export declare enum EnumVideoCodecs {
3
2
  H264 = "h264",
4
3
  VP9 = "VP9",
5
- VP8 = "VP8"
4
+ VP8 = "VP8",
5
+ RED = "red",
6
+ ULPFEC = "ulpfec",
7
+ RTX = "rtx"
6
8
  }
7
- export declare const browserSupportedVideoCodec: (codecs: string[]) => "" | EnumVideoCodec.H264 | EnumVideoCodecs.VP9 | EnumVideoCodecs.VP8;
9
+ export declare const browserSupportedVideoCodec: (codecs: string[]) => any[];