@livedigital/client 1.12.0 → 1.14.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.
@@ -1,7 +1,6 @@
1
1
  export declare const CHANNEL_EVENTS: {
2
2
  channelEvent: string;
3
3
  channelJoin: string;
4
- channelBroadcast: string;
5
4
  channelGetPeers: string;
6
5
  channelLeave: string;
7
6
  };
@@ -9,8 +8,6 @@ export declare const CLIENT_EVENTS: {
9
8
  channelEvent: string;
10
9
  peerJoined: string;
11
10
  peerLeft: string;
12
- channelLeave: string;
13
- peerBroadcasted: string;
14
11
  channelRejoinRequired: string;
15
12
  devicesListUpdated: string;
16
13
  };
@@ -21,14 +18,14 @@ export declare const PEER_EVENTS: {
21
18
  trackStart: string;
22
19
  trackEnd: string;
23
20
  };
24
- export declare const SOCKET_IO_EVENTS: {
25
- connected: string;
26
- reconnecting: string;
27
- reconnected: string;
28
- disconnected: string;
29
- reconnect: string;
30
- error: string;
31
- };
21
+ export declare enum SocketIOEvents {
22
+ Connected = "connected",
23
+ Reconnecting = "reconnecting",
24
+ Reconnected = "reconnected",
25
+ Disconnected = "disconnected",
26
+ Reconnect = "reconnect",
27
+ Error = "error"
28
+ }
32
29
  export declare const MEDIASOUP_EVENTS: {
33
30
  newProducer: string;
34
31
  producerClose: string;
@@ -1,34 +1,18 @@
1
1
  export declare const VIDEO_CONSTRAINS: {
2
2
  qvga: {
3
- width: {
4
- ideal: number;
5
- };
6
- height: {
7
- ideal: number;
8
- };
3
+ width: number;
4
+ height: number;
9
5
  };
10
6
  vga: {
11
- width: {
12
- ideal: number;
13
- };
14
- height: {
15
- ideal: number;
16
- };
7
+ width: number;
8
+ height: number;
17
9
  };
18
10
  hd: {
19
- width: {
20
- ideal: number;
21
- };
22
- height: {
23
- ideal: number;
24
- };
11
+ width: number;
12
+ height: number;
25
13
  };
26
14
  fullhd: {
27
- width: {
28
- ideal: number;
29
- };
30
- height: {
31
- ideal: number;
32
- };
15
+ width: number;
16
+ height: number;
33
17
  };
34
18
  };
@@ -1,4 +1,4 @@
1
- import { PeerResponse, JoinChannelParams, CreateCameraVideoTrackOptions, CreateMicrophoneAudioTrackOptions, CreateScreenVideoTrackOptions, CreateScreenAudioTrackOptions, Track } from '../types/common';
1
+ import { CreateCameraVideoTrackOptions, CreateMicrophoneAudioTrackOptions, CreateScreenAudioTrackOptions, CreateScreenVideoTrackOptions, JoinChannelParams, PeerResponse, Track } from '../types/common';
2
2
  import EnhancedEventEmitter from '../EnhancedEventEmitter';
3
3
  import System from './system';
4
4
  import Peer from './Peer';
@@ -18,6 +18,9 @@ declare class Engine {
18
18
  private mediaSoupEventsHandler;
19
19
  private initialized;
20
20
  private isJoined;
21
+ private app?;
22
+ private channel?;
23
+ private isRoomJoining;
21
24
  private logger;
22
25
  constructor(params: EngineParams);
23
26
  private initialize;
@@ -28,16 +31,21 @@ declare class Engine {
28
31
  get peers(): Peer[];
29
32
  get mySocketId(): string | undefined;
30
33
  join(params: JoinChannelParams): Promise<void>;
31
- setPeer(peerData: PeerResponse): void;
34
+ setPeer(peerData: PeerResponse): Peer;
32
35
  removePeer(peerId: string): void;
33
36
  pause(track: Track): Promise<void>;
34
37
  resume(track: Track): Promise<void>;
35
- createCameraVideoTrack(options?: CreateCameraVideoTrackOptions): Promise<Track | null>;
36
- createMicrophoneAudioTrack(options?: CreateMicrophoneAudioTrackOptions): Promise<Track | null>;
37
- createScreenVideoTrack(options?: CreateScreenVideoTrackOptions): Promise<Track | null>;
38
- createScreenAudioTrack(options?: CreateScreenAudioTrackOptions): Promise<Track | null>;
38
+ createCameraVideoTrack(options?: CreateCameraVideoTrackOptions): Promise<Track>;
39
+ createMicrophoneAudioTrack(options?: CreateMicrophoneAudioTrackOptions): Promise<Track>;
40
+ createScreenVideoTrack(options?: CreateScreenVideoTrackOptions): Promise<Track>;
41
+ createScreenAudioTrack(options?: CreateScreenAudioTrackOptions): Promise<Track>;
39
42
  publish(tracks: Track | Track[]): Promise<void>;
40
43
  unpublish(tracks?: Track | Track[]): Promise<void>;
41
44
  deleteTrack(tracks: Track): void;
45
+ get channelId(): string | undefined;
46
+ get appId(): string | undefined;
47
+ private getAvailableNode;
48
+ private waitForSocketConnection;
49
+ private performJoin;
42
50
  }
43
51
  export default Engine;
@@ -3,7 +3,12 @@ import Consumer from './Consumer';
3
3
  declare class VideoConsumer extends Consumer {
4
4
  spatialLayers: number;
5
5
  temporalLayers: number;
6
+ currentSpatialLayer: number;
7
+ currentTemporalLayer: number;
8
+ private readonly logger;
6
9
  constructor(consumer: MediasoupConsumer);
7
10
  parseScalabilityMode(): void;
11
+ setCurrentSpatialLayer(currentSpatialLayer: number): void;
12
+ setCurrentTemporalLayer(currentTemporalLayer: number): void;
8
13
  }
9
14
  export default VideoConsumer;
@@ -1,12 +1,12 @@
1
1
  import { Device } from 'mediasoup-client';
2
2
  import { RtpCapabilities, RtpCodecCapability } from 'mediasoup-client/lib/RtpParameters';
3
- import { Track } from '../../types/common';
3
+ import { CreateScreenVideoTrackOptions, CreateVideoTrackParams, Track } from '../../types/common';
4
4
  declare class Media {
5
5
  #private;
6
- mediasoupDevice: Device;
7
6
  isDeviceLoaded: boolean;
7
+ private device?;
8
8
  private tracks;
9
- constructor();
9
+ get mediasoupDevice(): Device;
10
10
  loadDevice(routerRtpCapabilities: RtpCapabilities): Promise<void>;
11
11
  getTrackCodec(track: Track): RtpCodecCapability | undefined;
12
12
  private createTrack;
@@ -14,5 +14,7 @@ declare class Media {
14
14
  createDisplayMediaTrack(constraints: MediaStreamConstraints): Promise<Track>;
15
15
  deleteTrack(track: Track): void;
16
16
  getAllTracks(): Track[];
17
+ static getScreenVideoTrackParams(options?: CreateScreenVideoTrackOptions): CreateVideoTrackParams;
18
+ static getCameraVideoTrackParams(options?: CreateScreenVideoTrackOptions): CreateVideoTrackParams;
17
19
  }
18
20
  export default Media;
@@ -1,5 +1,5 @@
1
1
  import { ProducerCodecOptions } from 'mediasoup-client/lib/Producer';
2
- import { AudioEncoderConfig } from 'types/common';
2
+ import { AudioEncoderConfig } from '../../../types/common';
3
3
  import BaseTrack from './BaseTrack';
4
4
  import TrackWithCodecOptions from './TrackWithCodecOptions';
5
5
  declare class AudioTrack extends BaseTrack implements TrackWithCodecOptions {
@@ -1,6 +1,6 @@
1
1
  import { Producer } from 'mediasoup-client/lib/Producer';
2
2
  import { MediaKind } from 'mediasoup-client/lib/RtpParameters';
3
- import { EncoderConfig, TrackLabel } from 'types/common';
3
+ import { EncoderConfig, TrackLabel } from '../../../types/common';
4
4
  declare class BaseTrack {
5
5
  #private;
6
6
  protected encoderConfig: EncoderConfig;
@@ -1,6 +1,6 @@
1
1
  import { ProducerCodecOptions } from 'mediasoup-client/lib/Producer';
2
2
  import { RtpEncodingParameters } from 'mediasoup-client/lib/RtpParameters';
3
- import { VideoCodec, VideoEncoderConfig } from 'types/common';
3
+ import { VideoCodec, VideoEncoderConfig } from '../../../types/common';
4
4
  import BaseTrack from './BaseTrack';
5
5
  import TrackWithCodecOptions from './TrackWithCodecOptions';
6
6
  import TrackWithEncodings from './TrackWithEncodings';
@@ -1,4 +1,4 @@
1
- import EnhancedEventEmitter from 'EnhancedEventEmitter';
1
+ import EnhancedEventEmitter from '../../EnhancedEventEmitter';
2
2
  declare type SystemParams = {
3
3
  clientEventEmitter: EnhancedEventEmitter;
4
4
  };
package/dist/index.d.ts CHANGED
@@ -23,10 +23,10 @@ declare class Client {
23
23
  unpublish(tracks?: Track | Track[]): Promise<void>;
24
24
  pause(track: Track): Promise<void>;
25
25
  resume(track: Track): Promise<void>;
26
- createCameraVideoTrack(options?: CreateCameraVideoTrackOptions): Promise<Track | null>;
27
- createMicrophoneAudioTrack(options?: CreateMicrophoneAudioTrackOptions): Promise<Track | null>;
28
- createScreenVideoTrack(options?: CreateScreenVideoTrackOptions): Promise<Track | null>;
29
- createScreenAudioTrack(options?: CreateScreenAudioTrackOptions): Promise<Track | null>;
26
+ createCameraVideoTrack(options?: CreateCameraVideoTrackOptions): Promise<Track>;
27
+ createMicrophoneAudioTrack(options?: CreateMicrophoneAudioTrackOptions): Promise<Track>;
28
+ createScreenVideoTrack(options?: CreateScreenVideoTrackOptions): Promise<Track>;
29
+ createScreenAudioTrack(options?: CreateScreenAudioTrackOptions): Promise<Track>;
30
30
  deleteTrack(track: Track): void;
31
31
  }
32
32
  export default Client;