@livedigital/client 1.10.0 → 1.13.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,6 +1,7 @@
1
1
  export declare const CHANNEL_EVENTS: {
2
2
  channelEvent: string;
3
3
  channelJoin: string;
4
+ channelBroadcast: string;
4
5
  channelGetPeers: string;
5
6
  channelLeave: string;
6
7
  };
@@ -9,6 +10,7 @@ export declare const CLIENT_EVENTS: {
9
10
  peerJoined: string;
10
11
  peerLeft: string;
11
12
  channelLeave: string;
13
+ peerBroadcasted: string;
12
14
  channelRejoinRequired: string;
13
15
  devicesListUpdated: string;
14
16
  };
@@ -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
  };
@@ -6,7 +6,7 @@ import Engine from './index';
6
6
  import PeerProducer from './PeerProducer';
7
7
  interface PeerConstructor {
8
8
  id: string;
9
- channelId: string;
9
+ channelIds: string[];
10
10
  appId: string;
11
11
  producers: ProducerData[];
12
12
  videoConsumer?: VideoConsumer;
@@ -24,7 +24,7 @@ export declare enum ScoreThreshold {
24
24
  }
25
25
  declare class Peer {
26
26
  id: string;
27
- channelId: string;
27
+ channelIds: string[];
28
28
  appId: string;
29
29
  loginDate: Date;
30
30
  uid?: string;
@@ -36,7 +36,7 @@ declare class Peer {
36
36
  private readonly logger;
37
37
  private incomingConnectionQuality;
38
38
  private outgoingConnectionQuality;
39
- constructor({ id, channelId, appId, loginDate, producers, engine, appData, uid, }: PeerConstructor);
39
+ constructor({ id, channelIds, appId, loginDate, producers, engine, appData, uid, }: PeerConstructor);
40
40
  get observer(): EnhancedEventEmitter;
41
41
  get isMe(): boolean;
42
42
  get publishedMedia(): PayloadOfPublishedMedia[];
@@ -32,11 +32,12 @@ declare class Engine {
32
32
  removePeer(peerId: string): void;
33
33
  pause(track: Track): Promise<void>;
34
34
  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>;
35
+ createCameraVideoTrack(options?: CreateCameraVideoTrackOptions): Promise<Track>;
36
+ createMicrophoneAudioTrack(options?: CreateMicrophoneAudioTrackOptions): Promise<Track>;
37
+ createScreenVideoTrack(options?: CreateScreenVideoTrackOptions): Promise<Track>;
38
+ createScreenAudioTrack(options?: CreateScreenAudioTrackOptions): Promise<Track>;
39
39
  publish(tracks: Track | Track[]): Promise<void>;
40
40
  unpublish(tracks?: Track | Track[]): Promise<void>;
41
+ deleteTrack(tracks: Track): void;
41
42
  }
42
43
  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,17 +1,20 @@
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
- mediasoupDevice: Device;
5
+ #private;
6
6
  isDeviceLoaded: boolean;
7
+ private device?;
7
8
  private tracks;
8
- constructor();
9
+ get mediasoupDevice(): Device;
9
10
  loadDevice(routerRtpCapabilities: RtpCapabilities): Promise<void>;
10
11
  getTrackCodec(track: Track): RtpCodecCapability | undefined;
11
12
  private createTrack;
12
13
  createUserMediaTrack(constraints: MediaStreamConstraints): Promise<Track>;
13
14
  createDisplayMediaTrack(constraints: MediaStreamConstraints): Promise<Track>;
14
- deleteTrack(track: Track): Promise<void>;
15
+ deleteTrack(track: Track): void;
15
16
  getAllTracks(): Track[];
17
+ static getScreenVideoTrackParams(options?: CreateScreenVideoTrackOptions): CreateVideoTrackParams;
18
+ static getCameraVideoTrackParams(options?: CreateScreenVideoTrackOptions): CreateVideoTrackParams;
16
19
  }
17
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,9 +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
+ deleteTrack(track: Track): void;
30
31
  }
31
32
  export default Client;