record_dir=/usr/local/FlashphonerWebCallServer/records
/stream/stopRecording, but not by stopping server itself. When server is stopping, current recordings will not be saved.Stream.stop()function onPlaying(stream) {
$("#playBtn").text("Stop").off('click').click(function () {
$(this).prop('disabled', true);
stream.stop();
}).prop('disabled', false);
$("#playInfo").text("");
}
/stream/terminatePOST /rest-api/stream/terminate HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json
{
"mediaSessionId":"4f112b20-13d0-11e7-b521-59a9cb7eddeb"
}
/stream/stopRecordingPOST /rest-api/stream/stopRecording HTTP/1.1
Host: 192.168.1.101:8081
Content-Type: application/json
{
"mediaSessionId":"b8ffd290-bcfa-11e9-9482-17706e285ec5"
}
on_record_hook.sh script, for exampleSTREAM_NAME=$1
SRC_FILE=$2
SRC_DIR="/usr/local/FlashphonerWebCallServer/records/"
REPLACE_STR="/var/www/html/stream_records/$STREAM_NAME-"
DST_FILE="${SRC_FILE/$SRC_DIR/$REPLACE_STR}"
cp $SRC_FILE $DST_FILE