Versions Compared

Key

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

...

  • HTTP: http://streaming.flashphoner.com:8081/rest-api/streamrecorder/startRecordingstartup
  • HTTPS: https://streaming.flashphoner.com:8444/rest-api/streamrecorder/startRecordingstartup

Where:

  • streaming.flashphoner.com is WCS server address
  • 8081 is a standard WCS REST / HTTP port
  • 8444 is a standard WCS REST / HTTPS port
  • rest-api is mandatory prefix
  • /streamrecorder/startRecording is startup is REST method

REST methods and response statuses

REST method

Example of REST query

Example of REST response

Response statuses

Description

/stream/startRecording,

/recorder/startup


Code Block
languagejs
themeRDark
{
 "mediaSessionId": "5a072377-73c1-4caf-abd3"
  "config": {
    "fileTemplate": "{streamName}-{startTime}-{endTime}",
    "rotation": "20M"
  }
}

404 - Not found

500 - Internal error


Start stream recording in specified mediasession


/stream/stopRecording,

/recorder/terminate

Code Block
languagejs
themeRDark
{
 "mediaSessionId": "5a072377-73c1-4caf-abd3"
}

404 - Not found

500 - Internal error

Stop stream recording in specified mediasession
/recorder/find_all
Code Block
languagejs
themeRDark
[
    {
        "fileName": "9c3e-test-1563776083752-{endTime}.mp4", 
        "mediaSessionId": "5a072377-73c1-4caf-abd3"
    }
]

404 - Not found

500 - Internal error

Find session recordings

Parameters

Parameter name

Description

Example

mediaSessionId

Media session identificator

5a072377-73c1-4caf-abd3

configRecord settings that redefine server settings
fileTemplateRecording file name template{streamName}-{startTime}-{endTime}
rotationEnables/disables rotation and duration/volume of fragments
20M

Recording on demand works as follows:

  • When REST API API /streamrecorder/startRecording startup query is called, current recording will be stopped.
  • New recording starts with settings passed in REST query.
  • If some setting is not defined in REST query, the server setting will be applied.

...

Code Block
languagejs
themeRDark
/stream/startRecording
{
  "mediaSessionId":"1234567890abcdefgh",
  "config": {
    "fileTemplate": "test",
    "rotation": "disabled"
  }
}

REST query /recorder/find_all returns session recordings list. The list shows both recordings on demand started via REST API and recordings initiated with WebSDK:

Code Block
languagejs
themeRDark
[
    {
        "fileName": "003f-1563776713987-{endTime}.mp4", 
        "mediaSessionId": "5af9c820-ac49-11e9-9f06-693cb47c4042"
    }, 
    {
        "fileName": "stream-57882100-ac49-11e9-afdd-6752f5be57a9-jtdvnittjkrd8rsc3dnfbger2o.mp4", 
        "mediaSessionId": "57882100-ac49-11e9-afdd-6752f5be57a9"
    }
]

How to get recording file name

...