@livedigital/client 2.36.0-debug-noise.1 → 2.37.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/index.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +15 -15
- package/src/engine/Logger.ts +1 -1
- package/src/engine/index.ts +14 -12
- package/src/index.ts +3 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@livedigital/client",
|
|
3
3
|
"author": "vlprojects",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.37.0",
|
|
6
6
|
"private": false,
|
|
7
7
|
"bugs": {
|
|
8
8
|
"url": "https://github.com/vlprojects/livedigital-sdk/issues"
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"async-mutex": "^0.3.2",
|
|
44
44
|
"awaitqueue": "^2.4.0",
|
|
45
45
|
"axios": "^0.21.4",
|
|
46
|
-
"debug": "^4.3.
|
|
46
|
+
"debug": "^4.3.4",
|
|
47
47
|
"mediasoup-client": "^3.6.50",
|
|
48
|
-
"qs": "^6.
|
|
48
|
+
"qs": "^6.11.0",
|
|
49
49
|
"serialize-error": "^7.0.1",
|
|
50
50
|
"socket.io-client": "^4.3.0",
|
|
51
|
-
"webrtc-issue-detector": "^1.
|
|
51
|
+
"webrtc-issue-detector": "^1.5.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@rollup/plugin-commonjs": "^19.0.0",
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
"@semantic-release/github": "^8.0.1",
|
|
61
61
|
"@semantic-release/npm": "^8.0.0",
|
|
62
62
|
"@semantic-release/release-notes-generator": "^10.0.2",
|
|
63
|
-
"@types/chai": "^4.
|
|
64
|
-
"@types/chai-as-promised": "^7.1.
|
|
63
|
+
"@types/chai": "^4.3.4",
|
|
64
|
+
"@types/chai-as-promised": "^7.1.5",
|
|
65
65
|
"@types/chai-subset": "^1.3.3",
|
|
66
66
|
"@types/faker": "^5.5.9",
|
|
67
|
-
"@types/mocha": "^
|
|
68
|
-
"@types/node": "^
|
|
67
|
+
"@types/mocha": "^10.0.1",
|
|
68
|
+
"@types/node": "^14.18.36",
|
|
69
69
|
"@types/qs": "^6.9.5",
|
|
70
|
-
"@types/sinon": "^10.0.
|
|
71
|
-
"@types/sinon-chai": "^3.2.
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
73
|
-
"@typescript-eslint/parser": "^4.
|
|
74
|
-
"axios-mock-adapter": "^1.
|
|
75
|
-
"chai": "^4.3.
|
|
70
|
+
"@types/sinon": "^10.0.13",
|
|
71
|
+
"@types/sinon-chai": "^3.2.9",
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^4.32.0",
|
|
73
|
+
"@typescript-eslint/parser": "^4.32.0",
|
|
74
|
+
"axios-mock-adapter": "^1.21.2",
|
|
75
|
+
"chai": "^4.3.7",
|
|
76
76
|
"chai-as-promised": "^7.1.1",
|
|
77
77
|
"chai-subset": "^1.6.0",
|
|
78
78
|
"dotenv": "^10.0.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"eslint-plugin-react": "^7.26.1",
|
|
85
85
|
"event-target-shim": "^6.0.2",
|
|
86
86
|
"faker": "^5.5.3",
|
|
87
|
-
"mocha": "^
|
|
87
|
+
"mocha": "^10.2.0",
|
|
88
88
|
"nyc": "^15.1.0",
|
|
89
89
|
"rollup": "^2.57.0",
|
|
90
90
|
"rollup-plugin-analyzer": "^4.0.0",
|
package/src/engine/Logger.ts
CHANGED
package/src/engine/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UnsupportedError as MediasoupUnsupportedError } from 'mediasoup-client/lib/errors';
|
|
2
2
|
import { RtpCapabilities } from 'mediasoup-client/lib/RtpParameters';
|
|
3
|
+
import WebRTCIssueDetector from 'webrtc-issue-detector';
|
|
3
4
|
import {
|
|
4
5
|
CreateCameraVideoTrackOptions,
|
|
5
6
|
CreateMicrophoneAudioTrackOptions,
|
|
@@ -44,6 +45,7 @@ type EngineParams = {
|
|
|
44
45
|
onLogMessage?: LogMessageHandler;
|
|
45
46
|
onIssues?: IssuesHandler;
|
|
46
47
|
onNetworkScoresUpdated?: NetworkScoresUpdatedHandler;
|
|
48
|
+
disableWid?: boolean;
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
class Engine {
|
|
@@ -75,7 +77,7 @@ class Engine {
|
|
|
75
77
|
|
|
76
78
|
private readonly logger: Logger;
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
private webRtcIssueDetector?: WebRTCIssueDetector;
|
|
79
81
|
|
|
80
82
|
constructor(params: EngineParams) {
|
|
81
83
|
const {
|
|
@@ -118,15 +120,15 @@ class Engine {
|
|
|
118
120
|
onLogMessage: params.onLogMessage,
|
|
119
121
|
});
|
|
120
122
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
this.webRtcIssueDetector = params.disableWid ? undefined : dependenciesFactory.createIssueDetector({
|
|
124
|
+
onIssues: params.onIssues,
|
|
125
|
+
onNetworkScoresUpdated: params.onNetworkScoresUpdated,
|
|
126
|
+
ignoreSSRCList: [1234], // mediasoup-client probator
|
|
127
|
+
logger: new Logger({
|
|
128
|
+
logLevel: this.logLevel,
|
|
129
|
+
namespace: 'WID',
|
|
130
|
+
}),
|
|
131
|
+
});
|
|
130
132
|
|
|
131
133
|
this.watchSocketState();
|
|
132
134
|
this.watchClientEvents();
|
|
@@ -137,7 +139,7 @@ class Engine {
|
|
|
137
139
|
const { rtpCapabilities } = await this.network.socket
|
|
138
140
|
.request('router.getRtpCapabilities') as { rtpCapabilities: RtpCapabilities };
|
|
139
141
|
await this.media.loadDevice(rtpCapabilities);
|
|
140
|
-
|
|
142
|
+
this.webRtcIssueDetector?.watchNewPeerConnections();
|
|
141
143
|
await this.network.createSendTransport(this.media.mediasoupDevice);
|
|
142
144
|
await this.network.createRecvTransport(this.media.mediasoupDevice);
|
|
143
145
|
this.initialized = true;
|
|
@@ -166,7 +168,7 @@ class Engine {
|
|
|
166
168
|
this.isJoined = false;
|
|
167
169
|
this.app = undefined;
|
|
168
170
|
this.channel = undefined;
|
|
169
|
-
|
|
171
|
+
this.webRtcIssueDetector?.stopWatchingNewPeerConnections();
|
|
170
172
|
this.network.socket.disconnect();
|
|
171
173
|
this.peersRepository.clear();
|
|
172
174
|
await this.network.closeSendTransport();
|
package/src/index.ts
CHANGED
|
@@ -26,6 +26,7 @@ type ClientParams = {
|
|
|
26
26
|
onLogMessage?: LogMessageHandler;
|
|
27
27
|
onIssues?: IssuesHandler,
|
|
28
28
|
onNetworkScoresUpdated?: NetworkScoresUpdatedHandler,
|
|
29
|
+
disableWid?: boolean,
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
class Client {
|
|
@@ -41,6 +42,7 @@ class Client {
|
|
|
41
42
|
onIssues,
|
|
42
43
|
onNetworkScoresUpdated,
|
|
43
44
|
logLevel,
|
|
45
|
+
disableWid,
|
|
44
46
|
} = params;
|
|
45
47
|
|
|
46
48
|
this._observer = observer ?? new EnhancedEventEmitter();
|
|
@@ -58,6 +60,7 @@ class Client {
|
|
|
58
60
|
onLogMessage,
|
|
59
61
|
onIssues,
|
|
60
62
|
onNetworkScoresUpdated,
|
|
63
|
+
disableWid,
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
66
|
|