Versions Compared

Key

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

...

REST-method

Example of REST query

Example of response

Response statuses

Description

/mixer/startup

Code Block
languagejs
themeRDark
{
  "uri": "mixer://mixer1",
  "localStreamName": "stream3",
  "hasVideo": "true",
  "hasAudio": "true",
  "watermark": "watermark.png",
  "background": "background.png",
  "mixerLayoutClass": "com.flashphoner.mixerlayout.TestLayout"
}

200 - OK

400 - Bad request

409 - Conflict

500 - Internal error

Creates a mixer the provided stream is published for

/mixer/add

Code Block
languagejs
themeRDark
{
  "uri": "mixer://mixer1",
  "remoteStreamName": "stream1",
  "hasVideo": "true",
  "hasAudio": "true",
  "streamLabel": "John Doe"
}

200 - OK

404 - Mixer not found

404 - Stream not found

500 - Internal error

Add the RTMP stream to the mixer

/mixer/remove

Code Block
languagejs
themeRDark
{
  "uri": "mixer://mixer1",
  "remoteStreamName": "stream1"
}

200 - OK

404 - Mixer not found

404 - Stream not found

500 - Internal error

Remove the RTMP stream from the mixer

/mixer/find_all


Code Block
languagejs
themeRDark
{
"localMediaSessionId": "ce92b134-2468-4460-8d06-1ea3c5aabace",
"remoteMediaSessionId": null,
"localStreamName": "mixer1",
"remoteStreamName": null,
"uri": "mixer://mixer1",
"status": "PROCESSED_LOCAL",
"mediaSessions": [
  "95bf2be8-f459-4f62-9a7f-c588f33e0ad3",
  "693781de-cada-4589-abe1-c3ee55c66901"
],
}

200 - OK

404 - Not found

500 - Internal error

Find all mixers

/mixer/terminate

Code Block
languagejs
themeRDark
{
  "uri": "mixer://mixer1"
}

200 - OK

404 - Not found

500 - Internal error

Terminate operation of the mixer

/stream/startRecording

Code Block
languagejs
themeRDark
{
  "mediaSessionId": "23d07fa1-3c74-4d6f-a0de-9b4bf83ce665"
}

200 - OK

404 - Not found

500 - Internal error

Start recording of the stream in the given media session

/stream/stopRecording

Code Block
languagejs
themeRDark
{
  "mediaSessionId": "23d07fa1-3c74-4d6f-a0de-9b4bf83ce665"
}

200 - OK

404 - Not found

500 - Internal error

Stop recording the stream in the given media session

/mixer/setAudioVideo

Code Block
languagejs
themeRDark
{
 "uri": "mixer://m1",
 "streams": "^stream.*",
 "audioLevel": 0,
 "videoMuted": true
}

200 - OK

400 - Bad request

404 - Not found

500 - Internal error

Mute/unmute video or change audio level for mexer incoming stream
/mixer/set_body_watermark
Code Block
languagejs
themeRDark
{
 "uri":"mixer://m1",
 "watermark":"/opt/media/logo.png",
 "x":10,
 "y":10,
 "marginTop":5,
 "marginLeft":5,
 "marginBottom":5,
 "marginRight":5
}

200 - OK

400 - Bad request

404 - Not found

Add watermark to mixer output stream picture
/mixer/set_stream_watermark
Code Block
languagejs
themeRDark
{
 "uri":"mixer://m1",
 "watermark":"/opt/media/logo.png",
 "mediaSessionId": "030bb470-185c-11ed-9fad-918e05233ae9",
 "x":10,
 "y":10,
 "marginTop":5,
 "marginLeft":5,
 "marginBottom":5,
 "marginRight":5
}

200 - OK

400 - Bad request

404 - Not found

Add watermark to one of the mixer input streams pictures in the mixer output stream
/mixer/set_stream_label
Code Block
languagejs
themeRDark
{
 "uri":"mixer://m1",
 "remoteStreamName":"stream1",
 "streamLabel": "Mr. John Doe"
}

200 - OK

404 - Not found

Set or change mixer participant stream label to display
/mixer/set_parameter
Code Block
languagejs
themeRDark
{
 "uri":"mixer://m1",
 "mixerLayoutDir":"/opt/GridLayout"
}

200 - OK

400 - Bad request

404 - Not found

Change the mixer parameter

...

Parameter name

Description

Example

uri

Unique identifier of the mixer

mixer://mixer1

localStreamName

Name of the output stream of the mixer

stream3

hasVideoMix videotrue
hasAudioMix audiotrue

remoteStreamName

Name of the stream added to the mixer

stream1

rtmp://rtmp.flashphoner.com:1935/live/rtmp_stream1

mediaSessionId

Media session identifier

ce92b134-2468-4460-8d06-1ea3c5aabace

status

Stream status

PROCESSED_LOCAL

backgroundMixer backgroundbackground.png
watermarkMixer watermarkwatermark.png
mixerLayoutClassMixer layoutcom.flashphoner.mixerlayout.TestLayout
streamsStreams list or regular expression for search

^stream.*

["stream1", "stream2"]

audioLevelIncoming stream audio level0
videoMutedMute videotrue
streamLabelMixer participant stream label to displayJohn Doe

Mixer configuration while creating the instance using REST API

...