Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

REST methods and responses

REST query

Example of REST query

Example of REST response

Response states

Description

/multipleRecorder/startup


Code Block
languagejs
themeRDark
{
 "
name
uri": "
test_
multi-recorder://test-record"
}

409 - Conflict

500 - Internal error


Launch multiple streams recorder

/multipleRecorder/add
Code Block
languagejs
themeRDark
{
 "
name
uri": "
test_
multi-recorder://test-record",
 "mediaSessionId": "866a9910-fbfe-11eb-aae4-6f99b0c80a3a"
}

404 - Not found

409 - Conflict

500 - Internal error

Add the stream with mediaSessionId to the recorder
/multipleRecorder/find_all
Code Block
languagejs
themeRDark
[
  {
    "mediaSessionsId": [
      "866a9910-fbfe-11eb-aae4-6f99b0c80a3a",
      "9f1e2530-fbfe-11eb-9ec1-77172ac14d86",
      "a970d0a0-fbfe-11eb-8fcc-912807bab442"
    ],
    "uri": "multi-recorder://test-record",
    "fileName": "
stream_multiRecorded
multi-recorder___test-record.mp4"
  }
]

404 - Not found

500 - Internal error

Find all recorders
/multipleRecorder/remove
Code Block
languagejs
themeRDark
{
 "
name
uri": "
test_
multi-recorder://test-record",
 "mediaSessionId": "866a9910-fbfe-11eb-aae4-6f99b0c80a3a"
}

404 - Not found

500 - Internal error

Remove stream with mediaSessionId from recorder
/multipleRecorder/terminate
Code Block
languagejs
themeRDark
{
 "
name
uri": "
test_
multi-recorder://test-record"
}

404 - Not found

500 - Internal error

Stop multiple streams recorder

Parametes

Parameter name

Description

Example

nametest_
uri
Имя рекордера
Recorder URImulti-recorder://test-record

mediaSessionId

Идентификатор медиасессии потокаstream_multiRecorded

Stream mediasession Id

866a9910-fbfe-11eb-aae4-6f99b0c80a3a

filename
Имя файла, куда производится запись
Recording file namemulti-recorder___test-record.mp4

...

Recording file name

Multiple streams recording file name is formed by template with suffix _multiRecorded addition. In this case, template. In this case:

1. {streamName} parameter is set according to recorder URI, replacing all the characters not allowed to use in file system to underline.

2. {startTime}, {endTime} parameters cannot be set because they depend on stream timestamps, and we have a multiple streams with a different timestamps simultaneously. So it is recommended to use {startTimeMillis}, {endTimeMillis} parameters to add servers clock timestamps to file name.

For example, with the following template

Code Block
languagejs
themeRDark
stream_record_policy_template={streamName}-{startTime}-{startTimeMillis}-{endTime}-{endTimeMillis}

the file name for recorder with URI

Code Block
languagejs
themeRDark
"uri": "multi-recorder://test-record"

will look as follows:

Code Block
themeRDark
test_multi-recorder___test-record--1-1628821032180--1-1628821151750_multiRecorded.mp4

...

Code Block
languagebash
themeRDark
cd /usr/local/FlashphonerWebCallServer/tools
./offline_mixer_tool.sh test_multi-recorder___test-record--1-1628821032180--1-1628821151750_multiRecorded.mp4

Offline mixer settings should be defined in /usr/local/FlashphonerWebCallServer/conf/offline_mixer.json file. By default, the following settings are used:

...

A mixed file is placed to the same folder as original one, with _mixed suffix addition, for example

Code Block
themeRDark
test_multi-recorder___test-record--1-1628821032180--1-1628821151750_multiRecorded_mixed.mp4

A picture sample from the mixed file

...