diff --git a/build-manifest.sh b/build-manifest.sh index ce37c03..60c9cc6 100644 --- a/build-manifest.sh +++ b/build-manifest.sh @@ -1,6 +1,6 @@ #!/bin/bash -PRIVMX_ENDPOINT="59babd13b63723000f4f29322e50f3ded110949d" +PRIVMX_ENDPOINT="devel" PSON_CPP="v1.0.7" GMP="6.3.0" POCO="1.10.1" diff --git a/scripts/build_api b/scripts/build_api index cf1c919..2031272 100755 --- a/scripts/build_api +++ b/scripts/build_api @@ -6,7 +6,8 @@ if [ -z "$1" ]; then echo "$0: Parameter missing. Pass privmx-endpoint version used in build process" exit -1; fi -PRIVMX_ENDPOINT_VERSION=$1 +PRIVMX_ENDPOINT_VERSION_IN=$1 +PRIVMX_ENDPOINT_VERSION="${PRIVMX_ENDPOINT_VERSION_IN//\//_}" source "$SCRIPT_PATH/config.sh" source "$EMSDK_DIR/emsdk_env.sh" diff --git a/scripts/build_privmx_endpoint b/scripts/build_privmx_endpoint index ae7d8f0..9cca2c6 100755 --- a/scripts/build_privmx_endpoint +++ b/scripts/build_privmx_endpoint @@ -7,11 +7,12 @@ if [ -z "$1" ]; then exit -1; fi VERSION=$1 +VERSION_AS_DIR="${VERSION//\//_}" source "$SCRIPT_PATH/config.sh" source "$EMSDK_DIR/emsdk_env.sh" -PRIVMX_ENDPOINT_DIR="$SOURCE_DIR/privmx-endpoint-$VERSION" +PRIVMX_ENDPOINT_DIR="$SOURCE_DIR/privmx-endpoint-$VERSION_AS_DIR" if [ -d "$PRIVMX_ENDPOINT_DIR" ]; then echo "$PRIVMX_ENDPOINT_DIR directory exists. Skip download of sources." diff --git a/scripts/check_dir_checksum b/scripts/check_dir_checksum index d359a13..e2a980d 100755 --- a/scripts/check_dir_checksum +++ b/scripts/check_dir_checksum @@ -8,7 +8,7 @@ if [[ $# -ne 1 ]]; then exit 2 fi echo "Checking dir: $1" -DIR_TO_CHECK="$1" +DIR_TO_CHECK="$1/" if [[ ! -d "$DIR_TO_CHECK" ]]; then echo "Error: '$DIR_TO_CHECK' is not a directory" >&2 diff --git a/src/api/StreamApiNative.ts b/src/api/StreamApiNative.ts index 0c52a91..c54eb0d 100644 --- a/src/api/StreamApiNative.ts +++ b/src/api/StreamApiNative.ts @@ -142,6 +142,12 @@ export class StreamApiNative extends BaseNative { ); } + async enableStreamRoomRecording(ptr: number, args: [string]): Promise { + return this.runAsync((taskId) => + this.api.lib.StreamApi_enableStreamRoomRecording(taskId, ptr, args), + ); + } + async publishStream(ptr: number, args: [number]): Promise { const ret = await this.runAsync((taskId) => this.api.lib.StreamApi_publishStream(taskId, ptr, args), diff --git a/src/service/StreamApi.ts b/src/service/StreamApi.ts index 9564d31..0d9d421 100644 --- a/src/service/StreamApi.ts +++ b/src/service/StreamApi.ts @@ -109,6 +109,11 @@ export class StreamApi extends BaseApi { return this.native.leaveStreamRoom(this.servicePtr, [streamRoomId]); } + public async enableStreamRoomRecording(streamRoomId: Types.StreamRoomId): Promise { + return this.native.enableStreamRoomRecording(this.servicePtr, [streamRoomId]); + } + + public async getStreamRoom(streamRoomId: Types.StreamRoomId): Promise { return this.native.getStreamRoom(this.servicePtr, [streamRoomId]); } diff --git a/webendpoint-cpp/include/Endpoint.hpp b/webendpoint-cpp/include/Endpoint.hpp index 96ab6cf..fa7ed6b 100644 --- a/webendpoint-cpp/include/Endpoint.hpp +++ b/webendpoint-cpp/include/Endpoint.hpp @@ -192,6 +192,7 @@ API_FUNCTION_HEADER(StreamApi, unpublishStream) API_FUNCTION_HEADER(StreamApi, joinStreamRoom) API_FUNCTION_HEADER(StreamApi, listStreams) API_FUNCTION_HEADER(StreamApi, leaveStreamRoom) +API_FUNCTION_HEADER(StreamApi, enableStreamRoomRecording) API_FUNCTION_HEADER(StreamApi, subscribeToRemoteStreams) API_FUNCTION_HEADER(StreamApi, modifyRemoteStreamsSubscriptions) diff --git a/webendpoint-cpp/src/Bindings.cpp b/webendpoint-cpp/src/Bindings.cpp index 7272bc3..18de85c 100644 --- a/webendpoint-cpp/src/Bindings.cpp +++ b/webendpoint-cpp/src/Bindings.cpp @@ -182,6 +182,7 @@ EMSCRIPTEN_BINDINGS(webendpoint) { BINDING_FUNCTION(StreamApi, joinStreamRoom) BINDING_FUNCTION(StreamApi, listStreams) BINDING_FUNCTION(StreamApi, leaveStreamRoom) + BINDING_FUNCTION(StreamApi, enableStreamRoomRecording) BINDING_FUNCTION(StreamApi, subscribeToRemoteStreams) BINDING_FUNCTION(StreamApi, modifyRemoteStreamsSubscriptions) diff --git a/webendpoint-cpp/src/Endpoint.cpp b/webendpoint-cpp/src/Endpoint.cpp index ccd5b21..3a6113c 100644 --- a/webendpoint-cpp/src/Endpoint.cpp +++ b/webendpoint-cpp/src/Endpoint.cpp @@ -363,6 +363,7 @@ API_FUNCTION(StreamApi, unpublishStream) API_FUNCTION(StreamApi, joinStreamRoom) API_FUNCTION(StreamApi, listStreams) API_FUNCTION(StreamApi, leaveStreamRoom) +API_FUNCTION(StreamApi, enableStreamRoomRecording) API_FUNCTION(StreamApi, subscribeToRemoteStreams) API_FUNCTION(StreamApi, modifyRemoteStreamsSubscriptions)