@livedigital/client 1.9.0 → 1.10.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.
- package/dist/engine/Peer.d.ts +16 -35
- package/dist/engine/PeerProducer.d.ts +2 -1
- package/dist/engine/index.d.ts +9 -9
- package/dist/engine/media/Consumer.d.ts +0 -1
- package/dist/engine/media/VideoConsumer.d.ts +1 -9
- package/dist/engine/media/index.d.ts +8 -10
- package/dist/engine/media/tracks/AudioTrack.d.ts +9 -0
- package/dist/engine/media/tracks/BaseTrack.d.ts +23 -0
- package/dist/engine/media/tracks/TrackWithCodecOptions.d.ts +4 -0
- package/dist/engine/media/tracks/TrackWithEncodings.d.ts +4 -0
- package/dist/engine/media/tracks/VideoTrack.d.ts +13 -0
- package/dist/engine/system/index.d.ts +1 -18
- package/dist/index.d.ts +9 -23
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/common.d.ts +57 -7
- package/package.json +11 -7
- package/src/engine/Peer.ts +132 -337
- package/src/engine/PeerProducer.ts +8 -2
- package/src/engine/index.ts +163 -194
- package/src/engine/media/Consumer.ts +0 -4
- package/src/engine/media/VideoConsumer.ts +1 -18
- package/src/engine/media/index.ts +32 -32
- package/src/engine/media/tracks/AudioTrack.ts +18 -0
- package/src/engine/media/tracks/BaseTrack.ts +70 -0
- package/src/engine/media/tracks/TrackWithCodecOptions.ts +5 -0
- package/src/engine/media/tracks/TrackWithEncodings.ts +5 -0
- package/src/engine/media/tracks/VideoTrack.ts +29 -0
- package/src/engine/system/index.ts +5 -167
- package/src/index.ts +21 -74
- package/src/types/common.ts +71 -8
package/dist/types/common.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import AudioTrack from 'engine/media/tracks/AudioTrack';
|
|
2
|
+
import VideoTrack from 'engine/media/tracks/VideoTrack';
|
|
3
|
+
import { MediaKind, RtpEncodingParameters, RtpParameters } from 'mediasoup-client/lib/types';
|
|
2
4
|
export declare type SocketResponse = {
|
|
3
5
|
success?: boolean;
|
|
4
6
|
error?: string;
|
|
@@ -17,6 +19,7 @@ export declare type ProducerData = {
|
|
|
17
19
|
id: string;
|
|
18
20
|
kind: MediaKind;
|
|
19
21
|
peerId: string;
|
|
22
|
+
label: TrackLabel;
|
|
20
23
|
};
|
|
21
24
|
export declare type PeerResponse = {
|
|
22
25
|
id: string;
|
|
@@ -94,12 +97,59 @@ export declare enum ConnectionQuality {
|
|
|
94
97
|
MEDIUM = 2,
|
|
95
98
|
GOOD = 3
|
|
96
99
|
}
|
|
97
|
-
export declare type
|
|
98
|
-
|
|
100
|
+
export declare type EncoderConfig = {};
|
|
101
|
+
export declare type VideoCodec = 'h264' | 'vp8';
|
|
102
|
+
export declare type VideoEncoderConfig = EncoderConfig & {
|
|
103
|
+
preferredCodec?: VideoCodec;
|
|
99
104
|
encodings?: RtpEncodingParameters[];
|
|
100
|
-
|
|
105
|
+
videoGoogleStartBitrate?: number;
|
|
101
106
|
};
|
|
102
|
-
export declare type
|
|
103
|
-
|
|
104
|
-
audioTrackConstraints: AudioTrackConstraints;
|
|
107
|
+
export declare type AudioEncoderConfig = EncoderConfig & {
|
|
108
|
+
enableFec?: boolean;
|
|
105
109
|
};
|
|
110
|
+
export declare type CreateTrackOptions = {
|
|
111
|
+
encoderConfig?: EncoderConfig;
|
|
112
|
+
deviceId?: string;
|
|
113
|
+
};
|
|
114
|
+
export declare type CreateVideoTrackOptions = CreateTrackOptions & {
|
|
115
|
+
width?: number;
|
|
116
|
+
height?: number;
|
|
117
|
+
frameRate?: number;
|
|
118
|
+
};
|
|
119
|
+
export declare type CreateCameraVideoTrackOptions = CreateVideoTrackOptions & {
|
|
120
|
+
encoderConfig?: VideoEncoderConfig;
|
|
121
|
+
};
|
|
122
|
+
export declare type CreateScreenVideoTrackOptions = CreateVideoTrackOptions & {
|
|
123
|
+
encoderConfig?: VideoEncoderConfig;
|
|
124
|
+
};
|
|
125
|
+
export declare type CreateMicrophoneAudioTrackOptions = CreateTrackOptions & {
|
|
126
|
+
encoderConfig?: AudioEncoderConfig;
|
|
127
|
+
};
|
|
128
|
+
export declare type CreateScreenAudioTrackOptions = CreateVideoTrackOptions & {
|
|
129
|
+
encoderConfig?: AudioEncoderConfig;
|
|
130
|
+
};
|
|
131
|
+
export declare type Track = VideoTrack | AudioTrack;
|
|
132
|
+
export declare enum TrackLabel {
|
|
133
|
+
Camera = "camera",
|
|
134
|
+
Microphone = "microphone",
|
|
135
|
+
ScreenVideo = "screen-video",
|
|
136
|
+
ScreenAudio = "screen-audio",
|
|
137
|
+
Unknown = "unknown"
|
|
138
|
+
}
|
|
139
|
+
export declare type StartTrackPayload = {
|
|
140
|
+
producerId: string;
|
|
141
|
+
consumerId?: string;
|
|
142
|
+
track: MediaStreamTrack;
|
|
143
|
+
label: TrackLabel;
|
|
144
|
+
};
|
|
145
|
+
export declare type EndTrackPayload = {
|
|
146
|
+
producerId: string;
|
|
147
|
+
kind: MediaKind;
|
|
148
|
+
label: TrackLabel;
|
|
149
|
+
};
|
|
150
|
+
export declare type PayloadOfPublishedMedia = {
|
|
151
|
+
producerId: string;
|
|
152
|
+
kind: MediaKind;
|
|
153
|
+
label: TrackLabel;
|
|
154
|
+
};
|
|
155
|
+
export declare type PayloadOfUnpublishedMedia = PayloadOfPublishedMedia;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@livedigital/client",
|
|
3
3
|
"author": "vlprojects",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.10.0",
|
|
6
6
|
"private": false,
|
|
7
7
|
"bugs": {
|
|
8
8
|
"url": "https://github.com/vlprojects/livedigital-sdk/issues"
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://github.com/VLprojects/livedigital-sdk.git"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "rm -rf dist && rollup -c && tsc",
|
|
26
|
+
"build": "rm -rf dist && rollup -c && tsc --importHelpers",
|
|
27
27
|
"lint": "eslint ./src",
|
|
28
|
-
"prepublish": "yarn
|
|
28
|
+
"prepublish": "yarn lint && yarn build"
|
|
29
29
|
},
|
|
30
30
|
"browserslist": {
|
|
31
31
|
"production": [
|
|
@@ -59,17 +59,21 @@
|
|
|
59
59
|
"@semantic-release/release-notes-generator": "^10.0.2",
|
|
60
60
|
"@types/node": "^12.0.0",
|
|
61
61
|
"@types/qs": "^6.9.5",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^4.29.3",
|
|
63
|
+
"@typescript-eslint/parser": "^4.29.3",
|
|
63
64
|
"dotenv": "^10.0.0",
|
|
64
|
-
"eslint": "
|
|
65
|
-
"eslint-config-airbnb-typescript": "^
|
|
65
|
+
"eslint": "7.32.0",
|
|
66
|
+
"eslint-config-airbnb-typescript": "^14.0.1",
|
|
66
67
|
"eslint-config-prettier": "^8.3.0",
|
|
67
68
|
"eslint-plugin-import": "^2.22.1",
|
|
69
|
+
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
70
|
+
"eslint-plugin-react": "^7.26.1",
|
|
68
71
|
"rollup": "^2.57.0",
|
|
69
72
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
70
73
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
71
74
|
"rollup-plugin-terser": "^7.0.2",
|
|
72
75
|
"rollup-plugin-typescript2": "^0.30.0",
|
|
73
|
-
"
|
|
76
|
+
"tslib": "^2.3.1",
|
|
77
|
+
"typescript": "^4.4.4"
|
|
74
78
|
}
|
|
75
79
|
}
|