@flashphoner/sfusdk 2.0.212 → 2.0.214
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/client.version +1 -1
- package/get-node-wrtc.sh +74 -0
- package/package.json +4 -2
package/dist/client.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.0.
|
|
1
|
+
2.0.214-98b6b41874860e21b264f00d5904461371e5c8e5
|
package/get-node-wrtc.sh
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# get-node-wrtc.sh
|
|
4
|
+
# The script is used in get-wrtc operation:
|
|
5
|
+
#
|
|
6
|
+
# npm run get-wrtc
|
|
7
|
+
#
|
|
8
|
+
# This provides a patched node-webrtc binary to support arg free setLocalDescription() implementation
|
|
9
|
+
|
|
10
|
+
FILE=wrtc.node
|
|
11
|
+
FOLDER=$(pwd)/node_modules/wrtc/build/Release
|
|
12
|
+
|
|
13
|
+
if [ ! -d $FOLDER ]; then
|
|
14
|
+
echo "No folder to download $FILE, skip the step"
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
URL=$1
|
|
19
|
+
if [ -z $URL ]; then
|
|
20
|
+
URL=https://flashphoner.com/downloads/builds/flashphoner_client/node-webrtc/1.0/current/wrtc.node
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
USR=$2
|
|
24
|
+
PASSWD=$3
|
|
25
|
+
|
|
26
|
+
COMMAND=$(command -v wget 2>/dev/null)
|
|
27
|
+
KEYS="--no-check-certificate -q"
|
|
28
|
+
if [ ! -z $USR ]; then
|
|
29
|
+
KEYS="$KEYS --user=$USR"
|
|
30
|
+
fi
|
|
31
|
+
if [ ! -z $PASSWD ]; then
|
|
32
|
+
KEYS="$KEYS --password=$PASSWD"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
if [ -z $COMMAND ]; then
|
|
36
|
+
COMMAND=$(command -v curl 2>/dev/null)
|
|
37
|
+
KEYS=""
|
|
38
|
+
if [ ! -z $USR ]; then
|
|
39
|
+
KEYS="-u $USR"
|
|
40
|
+
fi
|
|
41
|
+
if [ ! -z $PASSWD ]; then
|
|
42
|
+
KEYS="$KEYS:$PASSWD"
|
|
43
|
+
fi
|
|
44
|
+
KEYS="$KEYS -Lkso $FILE"
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
if [ -z $COMMAND ]; then
|
|
48
|
+
echo "No download tools available. Install wget or curl"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
cd $FOLDER
|
|
53
|
+
|
|
54
|
+
if [ -f $FILE ]; then
|
|
55
|
+
echo "Remove previous $FILE"
|
|
56
|
+
mv -f $FILE $FILE.bak
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
echo "Download $FILE to $(pwd)"
|
|
60
|
+
$COMMAND $KEYS $URL
|
|
61
|
+
RESULT=$?
|
|
62
|
+
if [ $? -ne 0 ]; then
|
|
63
|
+
echo "$FILE download failed: error $RESULT"
|
|
64
|
+
mv $FILE.bak $FILE
|
|
65
|
+
exit $RESULT
|
|
66
|
+
fi
|
|
67
|
+
if [ ! -f $FILE ]; then
|
|
68
|
+
echo "$FILE download failed: not available"
|
|
69
|
+
mv $FILE.bak $FILE
|
|
70
|
+
exit 1
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
echo "$FILE downloaded successfully"
|
|
74
|
+
chmod +x $FILE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flashphoner/sfusdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.214",
|
|
4
4
|
"description": "Official Flashphoner WebCallServer SFU SDK package",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"build": "tsc",
|
|
14
14
|
"publish-lib": "npm run build && npm publish",
|
|
15
15
|
"publish-beta": "npm run build && npm publish --tag beta",
|
|
16
|
-
"publish-dryrun": "npm run build && npm publish --dry-run"
|
|
16
|
+
"publish-dryrun": "npm run build && npm publish --dry-run",
|
|
17
|
+
"postinstall": "npm run get-wrtc",
|
|
18
|
+
"get-wrtc": "sh get-node-wrtc.sh $WRTC_URL $WRTC_USER $WRTC_PASSWD"
|
|
17
19
|
},
|
|
18
20
|
"keywords": [
|
|
19
21
|
"Flashphoner",
|