@livedigital/client 2.35.0 → 2.36.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 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -7
- package/src/engine/index.ts +5 -4
- 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.36.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.4.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@rollup/plugin-commonjs": "^19.0.0",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"@types/chai-as-promised": "^7.1.4",
|
|
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.35",
|
|
69
69
|
"@types/qs": "^6.9.5",
|
|
70
70
|
"@types/sinon": "^10.0.6",
|
|
71
71
|
"@types/sinon-chai": "^3.2.5",
|
|
@@ -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/index.ts
CHANGED
|
@@ -45,6 +45,7 @@ type EngineParams = {
|
|
|
45
45
|
onLogMessage?: LogMessageHandler;
|
|
46
46
|
onIssues?: IssuesHandler;
|
|
47
47
|
onNetworkScoresUpdated?: NetworkScoresUpdatedHandler;
|
|
48
|
+
disableWid?: boolean;
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
class Engine {
|
|
@@ -76,7 +77,7 @@ class Engine {
|
|
|
76
77
|
|
|
77
78
|
private readonly logger: Logger;
|
|
78
79
|
|
|
79
|
-
private webRtcIssueDetector
|
|
80
|
+
private webRtcIssueDetector?: WebRTCIssueDetector;
|
|
80
81
|
|
|
81
82
|
constructor(params: EngineParams) {
|
|
82
83
|
const {
|
|
@@ -119,7 +120,7 @@ class Engine {
|
|
|
119
120
|
onLogMessage: params.onLogMessage,
|
|
120
121
|
});
|
|
121
122
|
|
|
122
|
-
this.webRtcIssueDetector = dependenciesFactory.createIssueDetector({
|
|
123
|
+
this.webRtcIssueDetector = params.disableWid ? undefined : dependenciesFactory.createIssueDetector({
|
|
123
124
|
onIssues: params.onIssues,
|
|
124
125
|
onNetworkScoresUpdated: params.onNetworkScoresUpdated,
|
|
125
126
|
ignoreSSRCList: [1234], // mediasoup-client probator
|
|
@@ -138,7 +139,7 @@ class Engine {
|
|
|
138
139
|
const { rtpCapabilities } = await this.network.socket
|
|
139
140
|
.request('router.getRtpCapabilities') as { rtpCapabilities: RtpCapabilities };
|
|
140
141
|
await this.media.loadDevice(rtpCapabilities);
|
|
141
|
-
this.webRtcIssueDetector
|
|
142
|
+
this.webRtcIssueDetector?.watchNewPeerConnections();
|
|
142
143
|
await this.network.createSendTransport(this.media.mediasoupDevice);
|
|
143
144
|
await this.network.createRecvTransport(this.media.mediasoupDevice);
|
|
144
145
|
this.initialized = true;
|
|
@@ -167,7 +168,7 @@ class Engine {
|
|
|
167
168
|
this.isJoined = false;
|
|
168
169
|
this.app = undefined;
|
|
169
170
|
this.channel = undefined;
|
|
170
|
-
this.webRtcIssueDetector
|
|
171
|
+
this.webRtcIssueDetector?.stopWatchingNewPeerConnections();
|
|
171
172
|
this.network.socket.disconnect();
|
|
172
173
|
this.peersRepository.clear();
|
|
173
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
|
|