@live-change/peer-connection-service 0.8.36 → 0.8.38
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/package.json +2 -2
- package/turn.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/peer-connection-service",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.38",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
},
|
|
12
12
|
"author": "Michał Łaszczewski <michal@emikse.com>",
|
|
13
13
|
"license": "BSD-3-Clause",
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "69b15b8d593c02482e1f36590089a176d72bb4cd"
|
|
15
15
|
}
|
package/turn.js
CHANGED
|
@@ -28,6 +28,8 @@ function randomHexString(size) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async function createTurnConfiguration({ client }) {
|
|
31
|
+
if(!urls) throw new Error('TURN urls not configured')
|
|
32
|
+
if(!secret) throw new Error('TURN secret not configured')
|
|
31
33
|
const expire = Date.now() / 1000 + turnExpireTime | 0
|
|
32
34
|
const username = await randomHexString(10)
|
|
33
35
|
const rusername = expire + ':' + username
|