node-datachannel 0.4.1 → 0.4.2
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.
|
@@ -11,7 +11,7 @@ env:
|
|
|
11
11
|
|
|
12
12
|
jobs:
|
|
13
13
|
build-macos:
|
|
14
|
-
runs-on: macos-
|
|
14
|
+
runs-on: macos-11
|
|
15
15
|
strategy:
|
|
16
16
|
matrix:
|
|
17
17
|
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x]
|
|
@@ -34,4 +34,4 @@ jobs:
|
|
|
34
34
|
env:
|
|
35
35
|
CI: true
|
|
36
36
|
OPENSSL_ROOT_DIR: /tmp/opt/R/arm64
|
|
37
|
-
OPENSSL_LIBRARIES: /tmp/opt/R/arm64/lib
|
|
37
|
+
OPENSSL_LIBRARIES: /tmp/opt/R/arm64/lib
|
package/CMakeLists.txt
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
cmake_minimum_required(VERSION 3.15)
|
|
2
2
|
cmake_policy(SET CMP0091 NEW)
|
|
3
|
-
project(node_datachannel VERSION 0.4.
|
|
3
|
+
project(node_datachannel VERSION 0.4.2)
|
|
4
4
|
|
|
5
5
|
# Workaround for https://github.com/murat-dogan/node-datachannel/issues/65
|
|
6
|
-
if( NODE_RUNTIMEVERSION
|
|
6
|
+
if( NODE_RUNTIMEVERSION VERSION_GREATER "17.0.0" AND NODE_RUNTIMEVERSION VERSION_LESS "18.0.0" )
|
|
7
7
|
add_compile_definitions(OPENSSL_API_COMPAT=0x10100001L)
|
|
8
8
|
add_compile_definitions(OPENSSL_CONFIGURED_API=0x30000000L)
|
|
9
9
|
endif()
|
|
@@ -17,6 +17,10 @@ if(WIN32)
|
|
|
17
17
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
|
18
18
|
endif()
|
|
19
19
|
|
|
20
|
+
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
|
|
21
|
+
set(CMAKE_C_FLAGS "-Wno-error=unused-but-set-variable -Wno-error=strict-prototypes")
|
|
22
|
+
endif()
|
|
23
|
+
|
|
20
24
|
# Got linker error for arm64
|
|
21
25
|
# /usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: ../sysroot/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
|
|
22
26
|
# ../sysroot/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
|
|
@@ -33,7 +37,7 @@ include(FetchContent)
|
|
|
33
37
|
FetchContent_Declare(
|
|
34
38
|
libdatachannel
|
|
35
39
|
GIT_REPOSITORY https://github.com/paullouisageneau/libdatachannel.git
|
|
36
|
-
GIT_TAG "v0.18.
|
|
40
|
+
GIT_TAG "v0.18.2"
|
|
37
41
|
)
|
|
38
42
|
|
|
39
43
|
option(NO_MEDIA "Disable media transport support in libdatachannel" OFF)
|
|
@@ -85,6 +89,8 @@ set(LINK_LIBRARIES
|
|
|
85
89
|
|
|
86
90
|
if(APPLE)
|
|
87
91
|
#
|
|
92
|
+
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
|
|
93
|
+
list(APPEND LINK_LIBRARIES -static-libgcc)
|
|
88
94
|
elseif(UNIX)
|
|
89
95
|
list(APPEND LINK_LIBRARIES -static-libgcc -static-libstdc++)
|
|
90
96
|
endif()
|
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ npm install node-datachannel
|
|
|
31
31
|
| Node V16 | + | + | + | + | + | + |
|
|
32
32
|
| Node V17 | + | + | + | + | + | + |
|
|
33
33
|
| Node V18 | + | + | + | + | + | + |
|
|
34
|
+
| Node V19 | + | + | + | + | + | + |
|
|
34
35
|
|
|
35
36
|
1) Please note that; For Linux-arm64 platform we need OpenSSL to be installed locally.
|
|
36
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-datachannel",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "libdatachannel node bindings",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"_from": "node-datachannel@latest",
|
|
12
12
|
"scripts": {
|
|
13
|
-
"install": "prebuild-install || (npm install --ignore-scripts && npm run _prebuild)",
|
|
13
|
+
"install": "prebuild-install || (npm install --ignore-scripts --production=false && npm run _prebuild)",
|
|
14
14
|
"install-nice": "npm run clean && cmake-js build --CDUSE_NICE=1",
|
|
15
15
|
"build": "cmake-js build",
|
|
16
16
|
"build:debug": "cmake-js build -D",
|
|
@@ -517,10 +517,10 @@ Napi::Value PeerConnectionWrapper::createDataChannel(const Napi::CallbackInfo &i
|
|
|
517
517
|
switch (reliability.Get("type").As<Napi::Number>().Uint32Value())
|
|
518
518
|
{
|
|
519
519
|
case 1:
|
|
520
|
-
init.reliability.rexmit = reliability.Get("rexmit").As<Napi::Number>();
|
|
520
|
+
init.reliability.rexmit = static_cast<int>(reliability.Get("rexmit").As<Napi::Number>().ToNumber());
|
|
521
521
|
break;
|
|
522
522
|
case 2:
|
|
523
|
-
init.reliability.rexmit = std::chrono::milliseconds(reliability.Get("rexmit").As<Napi::Number>());
|
|
523
|
+
init.reliability.rexmit = std::chrono::milliseconds(reliability.Get("rexmit").As<Napi::Number>().Uint32Value());
|
|
524
524
|
break;
|
|
525
525
|
}
|
|
526
526
|
}
|