@auxilium/datalynk-client 1.1.5 → 1.1.7
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/README.md +31 -0
- package/dist/api.d.ts +9 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/index.js +150 -1
- package/dist/index.mjs +150 -1
- package/dist/socket.d.ts +4 -0
- package/dist/socket.d.ts.map +1 -1
- package/dist/webrtc.d.ts +51 -0
- package/dist/webrtc.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -401,3 +401,34 @@ api.files.upload(files).then(uploaded => {
|
|
|
401
401
|
```
|
|
402
402
|
|
|
403
403
|
</details>
|
|
404
|
+
|
|
405
|
+
<details>
|
|
406
|
+
<summary>
|
|
407
|
+
<h3 id="webrtc" style="display: inline">WebRTC</h3>
|
|
408
|
+
</summary>
|
|
409
|
+
|
|
410
|
+
Connect to a WebRTC chatroom to send audio/video to peers
|
|
411
|
+
|
|
412
|
+
```js
|
|
413
|
+
// Video elements to display stream on
|
|
414
|
+
const local = document.querySelector('#video1'); // <video id="video1" autoplay muted playsinline></video>
|
|
415
|
+
const remote = document.querySelector('#video2'); // <video id="video2" autoplay playsinline></video>
|
|
416
|
+
|
|
417
|
+
// Connect to a WebRTC room
|
|
418
|
+
const roomID = 'TEST_ROOM';
|
|
419
|
+
const session = await api.webrtc.connect(roomID, true, true); // audio = true, video = true
|
|
420
|
+
|
|
421
|
+
// Set local audio/video stream
|
|
422
|
+
local.srcObject = session.stream;
|
|
423
|
+
|
|
424
|
+
// Track is null on the initial connection, will fire again when the stream is ready
|
|
425
|
+
session.onConnected = (peer, stream) => {
|
|
426
|
+
// Set remote audio/video stream if ready
|
|
427
|
+
if(stream) remote.srcObject = stream;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// Disconnect from WebRTC room
|
|
431
|
+
session.disconnect();
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
</details>
|
package/dist/api.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Pdf } from './pdf';
|
|
|
7
7
|
import { ApiCall, Slice } from './slice';
|
|
8
8
|
import { Socket } from './socket';
|
|
9
9
|
import { Superuser } from './superuser';
|
|
10
|
+
import { WebRtc } from './webrtc';
|
|
10
11
|
export type JwtPayload = {
|
|
11
12
|
aud: string;
|
|
12
13
|
email: string;
|
|
@@ -41,6 +42,12 @@ export type ApiOptions = {
|
|
|
41
42
|
serviceWorker?: string;
|
|
42
43
|
/** Disable sockets with false or override socket URL */
|
|
43
44
|
socket?: false | string;
|
|
45
|
+
/** WebRTC TURN server URL */
|
|
46
|
+
webrtc?: {
|
|
47
|
+
url: string;
|
|
48
|
+
username?: string;
|
|
49
|
+
password?: string;
|
|
50
|
+
};
|
|
44
51
|
};
|
|
45
52
|
/**
|
|
46
53
|
* Possible options for API calls
|
|
@@ -90,6 +97,8 @@ export declare class Api {
|
|
|
90
97
|
readonly socket: Socket;
|
|
91
98
|
/** Superuser */
|
|
92
99
|
readonly superuser: Superuser;
|
|
100
|
+
/** WebRTC */
|
|
101
|
+
readonly webrtc: WebRtc;
|
|
93
102
|
/** Offline database */
|
|
94
103
|
database?: Database;
|
|
95
104
|
/** Options */
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAC,eAAe,EAAuB,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAE,KAAK,EAAC,MAAM,SAAS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AAQ,CAAC,OAAO,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC;IAiB7C;;;;;;OAMG;IACI,KAAK,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC;IAU7E;;;;;;;;;;;OAWG;IACI,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,CAAC,CAAC;IAqC/E;;;;;;;;;;;;OAYG;IACI,KAAK,CAAC,CAAC,SAAS,IAAI,GAAG,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;CAIjE"}
|
package/dist/index.js
CHANGED
|
@@ -274,6 +274,26 @@ function contrast(background) {
|
|
|
274
274
|
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
275
275
|
return luminance > 0.5 ? "black" : "white";
|
|
276
276
|
}
|
|
277
|
+
const LETTER_LIST = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
278
|
+
const NUMBER_LIST = "0123456789";
|
|
279
|
+
const SYMBOL_LIST = "~`!@#$%^&*()_-+={[}]|\\:;\"'<,>.?/";
|
|
280
|
+
function randomStringBuilder(length, letters = false, numbers = false, symbols = false) {
|
|
281
|
+
if (!letters && !numbers && !symbols) throw new Error("Must enable at least one: letters, numbers, symbols");
|
|
282
|
+
return Array(length).fill(null).map(() => {
|
|
283
|
+
let c;
|
|
284
|
+
do {
|
|
285
|
+
const type = ~~(Math.random() * 3);
|
|
286
|
+
if (letters && type == 0) {
|
|
287
|
+
c = LETTER_LIST[~~(Math.random() * LETTER_LIST.length)];
|
|
288
|
+
} else if (numbers && type == 1) {
|
|
289
|
+
c = NUMBER_LIST[~~(Math.random() * NUMBER_LIST.length)];
|
|
290
|
+
} else if (symbols && type == 2) {
|
|
291
|
+
c = SYMBOL_LIST[~~(Math.random() * SYMBOL_LIST.length)];
|
|
292
|
+
}
|
|
293
|
+
} while (!c);
|
|
294
|
+
return c;
|
|
295
|
+
}).join("");
|
|
296
|
+
}
|
|
277
297
|
class PromiseProgress extends Promise {
|
|
278
298
|
constructor(executor) {
|
|
279
299
|
super((resolve, reject) => executor(
|
|
@@ -3111,6 +3131,10 @@ class Socket {
|
|
|
3111
3131
|
* Add listener for all socket events
|
|
3112
3132
|
*
|
|
3113
3133
|
* @param {SocketListener} fn Callback function
|
|
3134
|
+
*
|
|
3135
|
+
*
|
|
3136
|
+
*
|
|
3137
|
+
*
|
|
3114
3138
|
* @return {Unsubscribe} Function to unsubscribe callback
|
|
3115
3139
|
*/
|
|
3116
3140
|
addListener(fn, reconnect) {
|
|
@@ -3221,7 +3245,124 @@ class Superuser {
|
|
|
3221
3245
|
} });
|
|
3222
3246
|
}
|
|
3223
3247
|
}
|
|
3224
|
-
const version = "1.1.
|
|
3248
|
+
const version = "1.1.7";
|
|
3249
|
+
class WebRtc {
|
|
3250
|
+
constructor(api) {
|
|
3251
|
+
__publicField(this, "ice");
|
|
3252
|
+
var _a, _b, _c;
|
|
3253
|
+
this.api = api;
|
|
3254
|
+
this.ice = clean({
|
|
3255
|
+
urls: [(_a = this.api.options.webrtc) == null ? void 0 : _a.url],
|
|
3256
|
+
username: (_b = this.api.options.webrtc) == null ? void 0 : _b.username,
|
|
3257
|
+
credential: (_c = this.api.options.webrtc) == null ? void 0 : _c.password
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
async answer(offer, stream) {
|
|
3261
|
+
const rtc = new RTCPeerConnection({ iceServers: [this.ice] });
|
|
3262
|
+
stream.getTracks().forEach((track) => rtc.addTrack(track, stream));
|
|
3263
|
+
await rtc.setRemoteDescription(new RTCSessionDescription(offer));
|
|
3264
|
+
const answer = await rtc.createAnswer();
|
|
3265
|
+
await rtc.setLocalDescription(answer);
|
|
3266
|
+
await new Promise((res) => {
|
|
3267
|
+
if (rtc.iceGatheringState === "complete") return res();
|
|
3268
|
+
rtc.onicegatheringstatechange = () => {
|
|
3269
|
+
if (rtc.iceGatheringState === "complete") res();
|
|
3270
|
+
};
|
|
3271
|
+
});
|
|
3272
|
+
return rtc;
|
|
3273
|
+
}
|
|
3274
|
+
async offer(stream) {
|
|
3275
|
+
const rtc = new RTCPeerConnection({ iceServers: [this.ice] });
|
|
3276
|
+
stream.getTracks().forEach((track) => rtc.addTrack(track, stream));
|
|
3277
|
+
await rtc.setLocalDescription(await rtc.createOffer());
|
|
3278
|
+
await new Promise((res) => {
|
|
3279
|
+
if (rtc.iceGatheringState === "complete") return res();
|
|
3280
|
+
rtc.onicegatheringstatechange = () => {
|
|
3281
|
+
if (rtc.iceGatheringState === "complete") res();
|
|
3282
|
+
};
|
|
3283
|
+
});
|
|
3284
|
+
return rtc;
|
|
3285
|
+
}
|
|
3286
|
+
/**
|
|
3287
|
+
* Create a new WebRTC connection to a room
|
|
3288
|
+
* @param {string} id Room ID
|
|
3289
|
+
* @param {(peer) => any} onConnect Callback when peers connect
|
|
3290
|
+
* @param {boolean} audio Stream local audio to room/peers
|
|
3291
|
+
* @param {boolean} video Stream local video to room/peers
|
|
3292
|
+
* @returns {Promise<WebRTCSession>} Connection session
|
|
3293
|
+
*/
|
|
3294
|
+
async connect(id = randomStringBuilder(16, true, true), audio = true, video = true) {
|
|
3295
|
+
const session = {
|
|
3296
|
+
open: true,
|
|
3297
|
+
id,
|
|
3298
|
+
uid: randomStringBuilder(8, true, true),
|
|
3299
|
+
peers: {},
|
|
3300
|
+
stream: await navigator.mediaDevices.getUserMedia({ audio, video }),
|
|
3301
|
+
disconnect: null,
|
|
3302
|
+
onConnected: null
|
|
3303
|
+
};
|
|
3304
|
+
const handleTracks = (session2, uid) => {
|
|
3305
|
+
if (!session2.open || !session2.onConnected) return;
|
|
3306
|
+
const peer = session2.peers[uid];
|
|
3307
|
+
const streams = peer.connection.getRemoteStreams();
|
|
3308
|
+
if (streams[0]) session2.onConnected(peer, streams[0]);
|
|
3309
|
+
else peer.connection.ontrack = ({ streams: streams2 }) => {
|
|
3310
|
+
if (session2.open && session2.onConnected) session2.onConnected(peer, streams2[0]);
|
|
3311
|
+
};
|
|
3312
|
+
};
|
|
3313
|
+
const unsubscribe = this.api.socket.addListener(async (event) => {
|
|
3314
|
+
var _a, _b, _c, _d;
|
|
3315
|
+
const key = Object.keys(event)[0];
|
|
3316
|
+
if (key == `webrtc/${id}`) {
|
|
3317
|
+
if (event[key].connected) {
|
|
3318
|
+
const payload = event[key].connected;
|
|
3319
|
+
session.peers[payload.uid] = {
|
|
3320
|
+
uid: payload.uid,
|
|
3321
|
+
username: payload.username,
|
|
3322
|
+
connection: await this.offer(session.stream)
|
|
3323
|
+
};
|
|
3324
|
+
this.api.socket.send({ [`webrtc/${id}`]: { offer: {
|
|
3325
|
+
to: payload.uid,
|
|
3326
|
+
uid: session.uid,
|
|
3327
|
+
username: (_a = this.api.auth.user) == null ? void 0 : _a.login,
|
|
3328
|
+
offer: session.peers[payload.uid].connection.localDescription
|
|
3329
|
+
} } });
|
|
3330
|
+
} else if (event[key].disconnected) {
|
|
3331
|
+
session.peers[event[key].disconnected.uid].connection.close();
|
|
3332
|
+
delete session.peers[event[key].disconnected.uid];
|
|
3333
|
+
} else if (event[key].offer && event[key].offer.to == session.uid) {
|
|
3334
|
+
const payload = event[key].offer;
|
|
3335
|
+
session.peers[payload.uid] = {
|
|
3336
|
+
uid: payload.uid,
|
|
3337
|
+
username: payload.username,
|
|
3338
|
+
connection: await this.answer(payload.offer, session.stream)
|
|
3339
|
+
};
|
|
3340
|
+
this.api.socket.send({ [`webrtc/${id}`]: { answer: {
|
|
3341
|
+
to: payload.uid,
|
|
3342
|
+
uid: session.uid,
|
|
3343
|
+
username: (_b = this.api.auth.user) == null ? void 0 : _b.login,
|
|
3344
|
+
answer: session.peers[payload.uid].connection.localDescription
|
|
3345
|
+
} } });
|
|
3346
|
+
handleTracks(session, payload.uid);
|
|
3347
|
+
} else if (event[key].answer && event[key].answer.to == session.uid) {
|
|
3348
|
+
(_d = (_c = session.peers[event[key].answer.uid]) == null ? void 0 : _c.connection) == null ? void 0 : _d.setRemoteDescription(new RTCSessionDescription(event[key].answer.answer));
|
|
3349
|
+
handleTracks(session, event[key].answer.uid);
|
|
3350
|
+
}
|
|
3351
|
+
}
|
|
3352
|
+
}, () => {
|
|
3353
|
+
var _a;
|
|
3354
|
+
return this.api.socket.send({ [`webrtc/${id}`]: { connected: { uid: session.uid, username: (_a = this.api.auth.user) == null ? void 0 : _a.login } } });
|
|
3355
|
+
});
|
|
3356
|
+
session.disconnect = () => {
|
|
3357
|
+
var _a;
|
|
3358
|
+
session.open = false;
|
|
3359
|
+
session.peers = {};
|
|
3360
|
+
this.api.socket.send({ [`webrtc/${id}`]: { disconnected: { uid: session.uid, username: (_a = this.api.auth.user) == null ? void 0 : _a.login } } });
|
|
3361
|
+
unsubscribe();
|
|
3362
|
+
};
|
|
3363
|
+
return session;
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3225
3366
|
const _Api = class _Api {
|
|
3226
3367
|
/**
|
|
3227
3368
|
* Connect to Datalynk & send requests
|
|
@@ -3254,6 +3395,8 @@ const _Api = class _Api {
|
|
|
3254
3395
|
__publicField(this, "socket");
|
|
3255
3396
|
/** Superuser */
|
|
3256
3397
|
__publicField(this, "superuser");
|
|
3398
|
+
/** WebRTC */
|
|
3399
|
+
__publicField(this, "webrtc");
|
|
3257
3400
|
/** Offline database */
|
|
3258
3401
|
__publicField(this, "database");
|
|
3259
3402
|
/** Options */
|
|
@@ -3276,6 +3419,11 @@ const _Api = class _Api {
|
|
|
3276
3419
|
origin: typeof location !== "undefined" ? location.host : "Unknown",
|
|
3277
3420
|
saveSession: true,
|
|
3278
3421
|
serviceWorker: "/service.worker.mjs",
|
|
3422
|
+
webrtc: {
|
|
3423
|
+
url: "turn:scarborough.auxilium.world:3478",
|
|
3424
|
+
username: "auxilium-webrtc",
|
|
3425
|
+
password: "UU3qkD95Tg54eF"
|
|
3426
|
+
},
|
|
3279
3427
|
...options
|
|
3280
3428
|
};
|
|
3281
3429
|
if (this.options.saveSession) {
|
|
@@ -3291,6 +3439,7 @@ const _Api = class _Api {
|
|
|
3291
3439
|
this.files = new Files(this);
|
|
3292
3440
|
this.pdf = new Pdf(this);
|
|
3293
3441
|
this.superuser = new Superuser(this);
|
|
3442
|
+
this.webrtc = new WebRtc(this);
|
|
3294
3443
|
if ((_a = this.options.offline) == null ? void 0 : _a.length) {
|
|
3295
3444
|
if (typeof indexedDB == "undefined") throw new Error("Cannot enable offline support, indexedDB is not available in this environment");
|
|
3296
3445
|
this.database = new Database("datalynk", this.options.offline);
|
package/dist/index.mjs
CHANGED
|
@@ -272,6 +272,26 @@ function contrast(background) {
|
|
|
272
272
|
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
273
273
|
return luminance > 0.5 ? "black" : "white";
|
|
274
274
|
}
|
|
275
|
+
const LETTER_LIST = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
276
|
+
const NUMBER_LIST = "0123456789";
|
|
277
|
+
const SYMBOL_LIST = "~`!@#$%^&*()_-+={[}]|\\:;\"'<,>.?/";
|
|
278
|
+
function randomStringBuilder(length, letters = false, numbers = false, symbols = false) {
|
|
279
|
+
if (!letters && !numbers && !symbols) throw new Error("Must enable at least one: letters, numbers, symbols");
|
|
280
|
+
return Array(length).fill(null).map(() => {
|
|
281
|
+
let c;
|
|
282
|
+
do {
|
|
283
|
+
const type = ~~(Math.random() * 3);
|
|
284
|
+
if (letters && type == 0) {
|
|
285
|
+
c = LETTER_LIST[~~(Math.random() * LETTER_LIST.length)];
|
|
286
|
+
} else if (numbers && type == 1) {
|
|
287
|
+
c = NUMBER_LIST[~~(Math.random() * NUMBER_LIST.length)];
|
|
288
|
+
} else if (symbols && type == 2) {
|
|
289
|
+
c = SYMBOL_LIST[~~(Math.random() * SYMBOL_LIST.length)];
|
|
290
|
+
}
|
|
291
|
+
} while (!c);
|
|
292
|
+
return c;
|
|
293
|
+
}).join("");
|
|
294
|
+
}
|
|
275
295
|
class PromiseProgress extends Promise {
|
|
276
296
|
constructor(executor) {
|
|
277
297
|
super((resolve, reject) => executor(
|
|
@@ -3109,6 +3129,10 @@ class Socket {
|
|
|
3109
3129
|
* Add listener for all socket events
|
|
3110
3130
|
*
|
|
3111
3131
|
* @param {SocketListener} fn Callback function
|
|
3132
|
+
*
|
|
3133
|
+
*
|
|
3134
|
+
*
|
|
3135
|
+
*
|
|
3112
3136
|
* @return {Unsubscribe} Function to unsubscribe callback
|
|
3113
3137
|
*/
|
|
3114
3138
|
addListener(fn, reconnect) {
|
|
@@ -3219,7 +3243,124 @@ class Superuser {
|
|
|
3219
3243
|
} });
|
|
3220
3244
|
}
|
|
3221
3245
|
}
|
|
3222
|
-
const version = "1.1.
|
|
3246
|
+
const version = "1.1.7";
|
|
3247
|
+
class WebRtc {
|
|
3248
|
+
constructor(api) {
|
|
3249
|
+
__publicField(this, "ice");
|
|
3250
|
+
var _a, _b, _c;
|
|
3251
|
+
this.api = api;
|
|
3252
|
+
this.ice = clean({
|
|
3253
|
+
urls: [(_a = this.api.options.webrtc) == null ? void 0 : _a.url],
|
|
3254
|
+
username: (_b = this.api.options.webrtc) == null ? void 0 : _b.username,
|
|
3255
|
+
credential: (_c = this.api.options.webrtc) == null ? void 0 : _c.password
|
|
3256
|
+
});
|
|
3257
|
+
}
|
|
3258
|
+
async answer(offer, stream) {
|
|
3259
|
+
const rtc = new RTCPeerConnection({ iceServers: [this.ice] });
|
|
3260
|
+
stream.getTracks().forEach((track) => rtc.addTrack(track, stream));
|
|
3261
|
+
await rtc.setRemoteDescription(new RTCSessionDescription(offer));
|
|
3262
|
+
const answer = await rtc.createAnswer();
|
|
3263
|
+
await rtc.setLocalDescription(answer);
|
|
3264
|
+
await new Promise((res) => {
|
|
3265
|
+
if (rtc.iceGatheringState === "complete") return res();
|
|
3266
|
+
rtc.onicegatheringstatechange = () => {
|
|
3267
|
+
if (rtc.iceGatheringState === "complete") res();
|
|
3268
|
+
};
|
|
3269
|
+
});
|
|
3270
|
+
return rtc;
|
|
3271
|
+
}
|
|
3272
|
+
async offer(stream) {
|
|
3273
|
+
const rtc = new RTCPeerConnection({ iceServers: [this.ice] });
|
|
3274
|
+
stream.getTracks().forEach((track) => rtc.addTrack(track, stream));
|
|
3275
|
+
await rtc.setLocalDescription(await rtc.createOffer());
|
|
3276
|
+
await new Promise((res) => {
|
|
3277
|
+
if (rtc.iceGatheringState === "complete") return res();
|
|
3278
|
+
rtc.onicegatheringstatechange = () => {
|
|
3279
|
+
if (rtc.iceGatheringState === "complete") res();
|
|
3280
|
+
};
|
|
3281
|
+
});
|
|
3282
|
+
return rtc;
|
|
3283
|
+
}
|
|
3284
|
+
/**
|
|
3285
|
+
* Create a new WebRTC connection to a room
|
|
3286
|
+
* @param {string} id Room ID
|
|
3287
|
+
* @param {(peer) => any} onConnect Callback when peers connect
|
|
3288
|
+
* @param {boolean} audio Stream local audio to room/peers
|
|
3289
|
+
* @param {boolean} video Stream local video to room/peers
|
|
3290
|
+
* @returns {Promise<WebRTCSession>} Connection session
|
|
3291
|
+
*/
|
|
3292
|
+
async connect(id = randomStringBuilder(16, true, true), audio = true, video = true) {
|
|
3293
|
+
const session = {
|
|
3294
|
+
open: true,
|
|
3295
|
+
id,
|
|
3296
|
+
uid: randomStringBuilder(8, true, true),
|
|
3297
|
+
peers: {},
|
|
3298
|
+
stream: await navigator.mediaDevices.getUserMedia({ audio, video }),
|
|
3299
|
+
disconnect: null,
|
|
3300
|
+
onConnected: null
|
|
3301
|
+
};
|
|
3302
|
+
const handleTracks = (session2, uid) => {
|
|
3303
|
+
if (!session2.open || !session2.onConnected) return;
|
|
3304
|
+
const peer = session2.peers[uid];
|
|
3305
|
+
const streams = peer.connection.getRemoteStreams();
|
|
3306
|
+
if (streams[0]) session2.onConnected(peer, streams[0]);
|
|
3307
|
+
else peer.connection.ontrack = ({ streams: streams2 }) => {
|
|
3308
|
+
if (session2.open && session2.onConnected) session2.onConnected(peer, streams2[0]);
|
|
3309
|
+
};
|
|
3310
|
+
};
|
|
3311
|
+
const unsubscribe = this.api.socket.addListener(async (event) => {
|
|
3312
|
+
var _a, _b, _c, _d;
|
|
3313
|
+
const key = Object.keys(event)[0];
|
|
3314
|
+
if (key == `webrtc/${id}`) {
|
|
3315
|
+
if (event[key].connected) {
|
|
3316
|
+
const payload = event[key].connected;
|
|
3317
|
+
session.peers[payload.uid] = {
|
|
3318
|
+
uid: payload.uid,
|
|
3319
|
+
username: payload.username,
|
|
3320
|
+
connection: await this.offer(session.stream)
|
|
3321
|
+
};
|
|
3322
|
+
this.api.socket.send({ [`webrtc/${id}`]: { offer: {
|
|
3323
|
+
to: payload.uid,
|
|
3324
|
+
uid: session.uid,
|
|
3325
|
+
username: (_a = this.api.auth.user) == null ? void 0 : _a.login,
|
|
3326
|
+
offer: session.peers[payload.uid].connection.localDescription
|
|
3327
|
+
} } });
|
|
3328
|
+
} else if (event[key].disconnected) {
|
|
3329
|
+
session.peers[event[key].disconnected.uid].connection.close();
|
|
3330
|
+
delete session.peers[event[key].disconnected.uid];
|
|
3331
|
+
} else if (event[key].offer && event[key].offer.to == session.uid) {
|
|
3332
|
+
const payload = event[key].offer;
|
|
3333
|
+
session.peers[payload.uid] = {
|
|
3334
|
+
uid: payload.uid,
|
|
3335
|
+
username: payload.username,
|
|
3336
|
+
connection: await this.answer(payload.offer, session.stream)
|
|
3337
|
+
};
|
|
3338
|
+
this.api.socket.send({ [`webrtc/${id}`]: { answer: {
|
|
3339
|
+
to: payload.uid,
|
|
3340
|
+
uid: session.uid,
|
|
3341
|
+
username: (_b = this.api.auth.user) == null ? void 0 : _b.login,
|
|
3342
|
+
answer: session.peers[payload.uid].connection.localDescription
|
|
3343
|
+
} } });
|
|
3344
|
+
handleTracks(session, payload.uid);
|
|
3345
|
+
} else if (event[key].answer && event[key].answer.to == session.uid) {
|
|
3346
|
+
(_d = (_c = session.peers[event[key].answer.uid]) == null ? void 0 : _c.connection) == null ? void 0 : _d.setRemoteDescription(new RTCSessionDescription(event[key].answer.answer));
|
|
3347
|
+
handleTracks(session, event[key].answer.uid);
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
}, () => {
|
|
3351
|
+
var _a;
|
|
3352
|
+
return this.api.socket.send({ [`webrtc/${id}`]: { connected: { uid: session.uid, username: (_a = this.api.auth.user) == null ? void 0 : _a.login } } });
|
|
3353
|
+
});
|
|
3354
|
+
session.disconnect = () => {
|
|
3355
|
+
var _a;
|
|
3356
|
+
session.open = false;
|
|
3357
|
+
session.peers = {};
|
|
3358
|
+
this.api.socket.send({ [`webrtc/${id}`]: { disconnected: { uid: session.uid, username: (_a = this.api.auth.user) == null ? void 0 : _a.login } } });
|
|
3359
|
+
unsubscribe();
|
|
3360
|
+
};
|
|
3361
|
+
return session;
|
|
3362
|
+
}
|
|
3363
|
+
}
|
|
3223
3364
|
const _Api = class _Api {
|
|
3224
3365
|
/**
|
|
3225
3366
|
* Connect to Datalynk & send requests
|
|
@@ -3252,6 +3393,8 @@ const _Api = class _Api {
|
|
|
3252
3393
|
__publicField(this, "socket");
|
|
3253
3394
|
/** Superuser */
|
|
3254
3395
|
__publicField(this, "superuser");
|
|
3396
|
+
/** WebRTC */
|
|
3397
|
+
__publicField(this, "webrtc");
|
|
3255
3398
|
/** Offline database */
|
|
3256
3399
|
__publicField(this, "database");
|
|
3257
3400
|
/** Options */
|
|
@@ -3274,6 +3417,11 @@ const _Api = class _Api {
|
|
|
3274
3417
|
origin: typeof location !== "undefined" ? location.host : "Unknown",
|
|
3275
3418
|
saveSession: true,
|
|
3276
3419
|
serviceWorker: "/service.worker.mjs",
|
|
3420
|
+
webrtc: {
|
|
3421
|
+
url: "turn:scarborough.auxilium.world:3478",
|
|
3422
|
+
username: "auxilium-webrtc",
|
|
3423
|
+
password: "UU3qkD95Tg54eF"
|
|
3424
|
+
},
|
|
3277
3425
|
...options
|
|
3278
3426
|
};
|
|
3279
3427
|
if (this.options.saveSession) {
|
|
@@ -3289,6 +3437,7 @@ const _Api = class _Api {
|
|
|
3289
3437
|
this.files = new Files(this);
|
|
3290
3438
|
this.pdf = new Pdf(this);
|
|
3291
3439
|
this.superuser = new Superuser(this);
|
|
3440
|
+
this.webrtc = new WebRtc(this);
|
|
3292
3441
|
if ((_a = this.options.offline) == null ? void 0 : _a.length) {
|
|
3293
3442
|
if (typeof indexedDB == "undefined") throw new Error("Cannot enable offline support, indexedDB is not available in this environment");
|
|
3294
3443
|
this.database = new Database("datalynk", this.options.offline);
|
package/dist/socket.d.ts
CHANGED
|
@@ -61,6 +61,10 @@ export declare class Socket {
|
|
|
61
61
|
* Add listener for all socket events
|
|
62
62
|
*
|
|
63
63
|
* @param {SocketListener} fn Callback function
|
|
64
|
+
*
|
|
65
|
+
*
|
|
66
|
+
*
|
|
67
|
+
*
|
|
64
68
|
* @return {Unsubscribe} Function to unsubscribe callback
|
|
65
69
|
*/
|
|
66
70
|
addListener(fn: SocketListener, reconnect: () => void): Unsubscribe;
|
package/dist/socket.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket.d.ts","sourceRoot":"","sources":["../src/socket.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAA;CACP,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;CAClB,CAA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AM,GAAG,KAAK,CAAC;CACrB,CAAA;AAED,qBAAqB;AACrB,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,CAAC;AACrE,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC;AAErC,iCAAiC;AACjC,qBAAa,MAAM;IAON,OAAO,CAAC,QAAQ,CAAC,GAAG;aAAuB,OAAO,EAAE,aAAa;IAN7E,OAAO,CAAC,SAAS,CAAoC;IACrD,OAAO,CAAC,KAAK,CAAC,CAAM;IACpB,OAAO,CAAC,MAAM,CAAC,CAAY;IAE3B,IAAI,UAAS;gBAEgB,GAAG,EAAE,GAAG,EAAkB,OAAO,GAAE,aAAkB;IAYlF;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,IAAI,GAAG,WAAW;IAOnE;;OAEG;IACH,KAAK;IASL;;;OAGG;IACH,OAAO,CAAC,OAAO,GAAE,MAAW;IAgC5B;;;;OAIG;IACH,IAAI,CAAC,OAAO,EAAE,GAAG;IAKjB;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,cAAc,CAAC,gBAAgB,CAAC,GAAG,WAAW;CAUlH"}
|
package/dist/webrtc.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Unsubscribe } from '@ztimson/utils';
|
|
2
|
+
import { Api } from './api';
|
|
3
|
+
/** WebRTC peer */
|
|
4
|
+
export type WebRTCPeer = {
|
|
5
|
+
/** Peer connection UID */
|
|
6
|
+
uid: string;
|
|
7
|
+
/** Peer username */
|
|
8
|
+
username: string;
|
|
9
|
+
/** Remote connection to stream */
|
|
10
|
+
connection: RTCPeerConnection;
|
|
11
|
+
};
|
|
12
|
+
/** WebRTC session */
|
|
13
|
+
export type WebRTCSession = {
|
|
14
|
+
/** Is the connection active? */
|
|
15
|
+
open: boolean;
|
|
16
|
+
/** Room ID */
|
|
17
|
+
id: string;
|
|
18
|
+
/** Connection UID */
|
|
19
|
+
uid: string;
|
|
20
|
+
/** Local media stream */
|
|
21
|
+
stream: MediaStream;
|
|
22
|
+
/** Connected peers sorted by UID */
|
|
23
|
+
peers: {
|
|
24
|
+
[key: string]: WebRTCPeer;
|
|
25
|
+
};
|
|
26
|
+
/** Disconnection session */
|
|
27
|
+
disconnect: Unsubscribe;
|
|
28
|
+
/** Callback when peers connect */
|
|
29
|
+
onConnected?: (peer: WebRTCPeer, track: any) => any;
|
|
30
|
+
};
|
|
31
|
+
export declare class WebRtc {
|
|
32
|
+
private api;
|
|
33
|
+
readonly ice: {
|
|
34
|
+
urls: string[];
|
|
35
|
+
username?: string;
|
|
36
|
+
credential?: string;
|
|
37
|
+
};
|
|
38
|
+
constructor(api: Api);
|
|
39
|
+
private answer;
|
|
40
|
+
private offer;
|
|
41
|
+
/**
|
|
42
|
+
* Create a new WebRTC connection to a room
|
|
43
|
+
* @param {string} id Room ID
|
|
44
|
+
* @param {(peer) => any} onConnect Callback when peers connect
|
|
45
|
+
* @param {boolean} audio Stream local audio to room/peers
|
|
46
|
+
* @param {boolean} video Stream local video to room/peers
|
|
47
|
+
* @returns {Promise<WebRTCSession>} Connection session
|
|
48
|
+
*/
|
|
49
|
+
connect(id?: string, audio?: boolean, video?: boolean): Promise<WebRTCSession>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=webrtc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webrtc.d.ts","sourceRoot":"","sources":["../src/webrtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,kBAAkB;AAClB,MAAM,MAAM,UAAU,GAAG;IACxB,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,UAAU,EAAE,iBAAiB,CAAA;CAC7B,CAAA;AAED,qBAAqB;AACrB,MAAM,MAAM,aAAa,GAAG;IAC3B,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,cAAc;IACd,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB;IACzB,MAAM,EAAE,WAAW,CAAC;IACpB,oCAAoC;IACpC,KAAK,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAAC,CAAA;IAClC,4BAA4B;IAC5B,UAAU,EAAE,WAAW,CAAA;IACvB,kCAAkC;IAClC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;CACnD,CAAA;AAED,qBAAa,MAAM;IAGN,OAAO,CAAC,GAAG;IAFvB,SAAgB,GAAG,EAAG;QAAC,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;gBAE3D,GAAG,EAAE,GAAG;YAQd,MAAM;YAaN,KAAK;IAWnB;;;;;;;OAOG;IACG,OAAO,CAAC,EAAE,GAAE,MAA4C,EAAE,KAAK,UAAO,EAAE,KAAK,UAAO,GAAG,OAAO,CAAC,aAAa,CAAC;CAoEnH"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@auxilium/datalynk-client",
|
|
3
3
|
"description": "Datalynk client library",
|
|
4
4
|
"repository": "https://gitlab.auxiliumgroup.com/auxilium/datalynk/datalynk-client",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.7",
|
|
6
6
|
"author": "Zak Timson <zaktimson@gmail.com>",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "./dist/index.cjs",
|