node-datachannel 0.3.6 → 0.4.1
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/.github/workflows/build-linux-arm64-test.yml +1 -1
- package/.github/workflows/build-linux.yml +3 -3
- package/.github/workflows/build-mac-m1.yml +1 -1
- package/.github/workflows/build-mac-x64.yml +1 -1
- package/.github/workflows/build-win.yml +3 -3
- package/API.md +5 -0
- package/CMakeLists.txt +13 -15
- package/LICENSE +373 -504
- package/README.md +1 -0
- package/lib/index.d.ts +4 -1
- package/package.json +3 -2
- package/src/data-channel-wrapper.cpp +1 -1
- package/src/peer-connection-wrapper.cpp +30 -5
- package/src/peer-connection-wrapper.h +8 -1
- package/src/rtc-wrapper.cpp +42 -2
- package/src/rtc-wrapper.h +4 -0
- package/test/connectivity.js +1 -0
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
runs-on: ubuntu-20.04
|
|
15
15
|
strategy:
|
|
16
16
|
matrix:
|
|
17
|
-
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x]
|
|
17
|
+
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x]
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
20
|
- uses: actions/checkout@v2
|
|
@@ -40,7 +40,7 @@ jobs:
|
|
|
40
40
|
|
|
41
41
|
strategy:
|
|
42
42
|
matrix:
|
|
43
|
-
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x]
|
|
43
|
+
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x]
|
|
44
44
|
steps:
|
|
45
45
|
- uses: actions/checkout@v2
|
|
46
46
|
- name: Prepare Cross Compile
|
|
@@ -68,7 +68,7 @@ jobs:
|
|
|
68
68
|
|
|
69
69
|
strategy:
|
|
70
70
|
matrix:
|
|
71
|
-
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x]
|
|
71
|
+
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x]
|
|
72
72
|
steps:
|
|
73
73
|
- uses: actions/checkout@v2
|
|
74
74
|
- name: Prepare Cross Compile
|
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
runs-on: windows-2019
|
|
15
15
|
strategy:
|
|
16
16
|
matrix:
|
|
17
|
-
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x]
|
|
17
|
+
node-version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x]
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
20
|
- uses: actions/checkout@v2
|
|
@@ -42,7 +42,7 @@ jobs:
|
|
|
42
42
|
runs-on: windows-2019
|
|
43
43
|
strategy:
|
|
44
44
|
matrix:
|
|
45
|
-
node_version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x]
|
|
45
|
+
node_version: [10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x, 17.x, 18.x, 19.x]
|
|
46
46
|
node_arch:
|
|
47
47
|
- x86
|
|
48
48
|
steps:
|
|
@@ -52,7 +52,7 @@ jobs:
|
|
|
52
52
|
arch: x86
|
|
53
53
|
- name: Install OpenSSL
|
|
54
54
|
run: choco install openssl --x86=true
|
|
55
|
-
- name: Use Node.js ${{ matrix.
|
|
55
|
+
- name: Use Node.js ${{ matrix.node_version }}
|
|
56
56
|
uses: aminya/setup-node@x86
|
|
57
57
|
with:
|
|
58
58
|
node-version: ${{ matrix.node_version }}
|
package/API.md
CHANGED
|
@@ -11,6 +11,7 @@ let pc = new PeerConnection(peerName[,options])
|
|
|
11
11
|
export interface RtcConfig {
|
|
12
12
|
iceServers: (string | IceServer)[];
|
|
13
13
|
proxyServer?: ProxyServer;
|
|
14
|
+
bindAddress?: string;
|
|
14
15
|
enableIceTcp?: boolean;
|
|
15
16
|
enableIceUdpMux?: boolean;
|
|
16
17
|
portRangeBegin?: number;
|
|
@@ -49,6 +50,10 @@ TURN Server Example (TLS) : turns:USERNAME:PASSWORD@TURN_IP_OR_ADDRESS:PORT
|
|
|
49
50
|
|
|
50
51
|
Close Peer Connection
|
|
51
52
|
|
|
53
|
+
**destroy: () => void**
|
|
54
|
+
|
|
55
|
+
Close Peer Connection & Clear all callbacks
|
|
56
|
+
|
|
52
57
|
**setRemoteDescription: (sdp: string, type: DescriptionType) => void**
|
|
53
58
|
|
|
54
59
|
Set Remote Description
|
package/CMakeLists.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cmake_minimum_required(VERSION 3.15)
|
|
2
2
|
cmake_policy(SET CMP0091 NEW)
|
|
3
|
-
project(node_datachannel VERSION 0.
|
|
3
|
+
project(node_datachannel VERSION 0.4.1)
|
|
4
4
|
|
|
5
5
|
# Workaround for https://github.com/murat-dogan/node-datachannel/issues/65
|
|
6
6
|
if( NODE_RUNTIMEVERSION VERSION_GREATER_EQUAL "17.0.0")
|
|
@@ -17,18 +17,13 @@ if(WIN32)
|
|
|
17
17
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
|
18
18
|
endif()
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# Got linker error for arm64
|
|
21
|
+
# /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
|
+
# ../sysroot/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
|
|
23
|
+
# (.text+0x1240): dangerous relocation: unsupported relocation
|
|
24
|
+
if(NOT ${NODE_ARCH} STREQUAL "arm64")
|
|
21
25
|
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
|
22
26
|
find_package(OpenSSL REQUIRED)
|
|
23
|
-
elseif(UNIX)
|
|
24
|
-
# Got linker error for arm64
|
|
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
|
|
26
|
-
# ../sysroot/usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
|
|
27
|
-
# (.text+0x1240): dangerous relocation: unsupported relocation
|
|
28
|
-
if(NOT ${NODE_ARCH} STREQUAL "arm64")
|
|
29
|
-
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
|
30
|
-
find_package(OpenSSL REQUIRED)
|
|
31
|
-
endif()
|
|
32
27
|
endif()
|
|
33
28
|
|
|
34
29
|
|
|
@@ -38,7 +33,7 @@ include(FetchContent)
|
|
|
38
33
|
FetchContent_Declare(
|
|
39
34
|
libdatachannel
|
|
40
35
|
GIT_REPOSITORY https://github.com/paullouisageneau/libdatachannel.git
|
|
41
|
-
GIT_TAG "v0.
|
|
36
|
+
GIT_TAG "v0.18.0"
|
|
42
37
|
)
|
|
43
38
|
|
|
44
39
|
option(NO_MEDIA "Disable media transport support in libdatachannel" OFF)
|
|
@@ -73,9 +68,12 @@ target_include_directories(${PROJECT_NAME} PRIVATE
|
|
|
73
68
|
${CMAKE_BINARY_DIR}/_deps/libdatachannel-src/include
|
|
74
69
|
)
|
|
75
70
|
|
|
76
|
-
|
|
77
|
-
#
|
|
78
|
-
|
|
71
|
+
if( NODE_RUNTIMEVERSION VERSION_LESS "16.0.0")
|
|
72
|
+
# For compatibility with Node.js 12
|
|
73
|
+
# This should be removed along with the napi-thread-safe-callback-cancellable dependency when dropping support at end-of-life
|
|
74
|
+
target_compile_definitions(${PROJECT_NAME} PRIVATE -DLEGACY_NAPI_THREAD_SAFE_CALLBACK)
|
|
75
|
+
endif()
|
|
76
|
+
|
|
79
77
|
target_include_directories(${PROJECT_NAME} PRIVATE
|
|
80
78
|
${CMAKE_SOURCE_DIR}/node_modules/napi-thread-safe-callback-cancellable
|
|
81
79
|
)
|