Versions Compared

Key

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

...

REST-method

Example of REST query body

Example of response

Response statuses

Description

/push/startup

Code Block
languagejs
themeRDark
{
"streamName": "name",
"rtmpUrl": "rtmp://localhost:1935/live",
"rtmpTransponderFullUrl": false
"options": {}
}
Code Block
languagejs
themeRDark
{
"mediaSessionId": "eume87rjk3df1i9u14elffga6t",
"streamName": "rtmp_name",
"rtmpUrl": "rtmp://localhost:1935/live",
"width": 320,
"height": 240,
"muted": false,
"soundEnabled": false,
"options": {}
}

409 - Conflict

500 - Internal error

Creates a transponder that subscribes to the given stream and sends media traffic to the specified rtmpUrl.


The name of the stream specified in the query can be the name of an already published stream or the name reserved when the SIP call was created (to send media traffic received from SIP).


If a transponder for the given stream and rtmpUrl already exists, 409 Conflict is returned.

/push/find

Code Block
languagejs
themeRDark
{
"streamName": "name",
"rtmpUrl": "rtmp://localhost:1935/live",
}
Code Block
languagejs
themeRDark
[{
"mediaSessionId": "eume87rjk3df1i9u14elffga6t",
"streamName": "rtmp_name",
"rtmpUrl": "rtmp://localhost:1935/live",
"width": 320,
"height": 240,
"muted": false,
"soundEnabled": false,
"options": {}
}]

404 - Transponder not found

500 - Internal error

Find transponders by a filter

/push/find_all

 

Code Block
languagejs
themeRDark
[{
"mediaSessionId": "eume87rjk3df1i9u14elffga6t",
"streamName": "rtmp_name",
"rtmpUrl": "rtmp://localhost:1935/live",
"width": 320,
"height": 240,
"muted": false,
"soundEnabled": false,
"options": {}
}]

404 - Not found any transponder

500 - Internal error

Find all transponders

/push/terminate

Code Block
languagejs
themeRDark
{
"mediaSessionId": "eume87rjk3df1i9u14elffga6t"
}

 

404 - Not found transponder

500 - Internal error

Terminate operation of the transponder

/push/mute

Code Block
languagejs
themeRDark
{
"mediaSessionId": "eume87rjk3df1i9u14elffga6t"
}

void

404 - Not found transponder

500 - Internal error

Turn off audio

/push/unmute

Code Block
languagejs
themeRDark
{
"mediaSessionId": "eume87rjk3df1i9u14elffga6t"
}

void

404 - Not found transponder

500 - Internal error

Turn on audio

/push/sound_on

Code Block
languagejs
themeRDark
{
"mediaSessionId": "eume87rjk3df1i9u14elffga6t"
"soundFile": "test.wav"
"loop": true
}

void

404 - Not found transponder

404 - No such file

500 - Internal error

Insert audio from a RIFF WAV file located in the /usr/local/ FlashphonerWebCallServer/media/ directory on the WCS server

/push/sound_off

Code Block
languagejs
themeRDark
{
"mediaSessionId": "eume87rjk3df1i9u14elffga6t"
}

void

404 - Not found transponder

500 - Internal error

Stop inserting audio from the file

...

Parameter name

Description

Example

streamName

Name of the republished stream

streamName

rtmpUrl

URL of the server the stream is republished to

rtmp://localhost:1935/live

rtmpFlashVersionRTMP subscriber Flash versionLNX 76.219.189.0

options

Transponder options

{"action": "mute"}

mediaSessionId

Unique identifier of the transponder

eume87rjk3df1i9u14elffga6t

width

Image width

320

height

Image height

240

keyFrameIntervalVideo keyframe interval60
fpsVideo framerate30

muted

Is sound muted

true

soundEnabled

Is sound enabled

true

soundFile

Sound file

test.wav

loop

Loop playback

false

rtmpTransponderFullUrlTake stream name to publish  to RTMP server from RTMP URLfalse

Parameters added since build 5.2.785: rtmpFlashVersion, keyFrameInterval and fps.

...

Since build 5.2.785, there are two more parameters enabling transcoding: keyFrameInterval and fps. Stream will be transcoded if either of them, or height is specified.

Set stream name to publish to RTMP server

By default, a stream will be published to RTMP server with the same name as it is publishing on WCS, and the prefix rtmp_, for example rtmp_test. This behaviour can be changed by the following parameters

Code Block
themeRDark
rtmp_transponder_full_url=true
rtmp_transponder_stream_name_prefix=

But, these settings are applyed to all the republishings, and require server restart. That's why since build 5.2.860 the /push/startup query parameter is added to allow to define full RTMP URL, including stream name on RTMP server, regardless of server settings

Code Block
languagejs
themeRDark
POST /rest-api/push/startup HTTP/1.1
Host: localhost:8081
Content-Type: application/json

{
 "streamName":"stream1",
 "rtmpUrl":"rtmp://rtmp.flashphoner.com:1935/live/test",
 "rtmpTransponderFullUrl":true
}

In this case, the stream will be published to RTMP server with the name defined in RTMP URL even with default WCS settings.

Sending the REST query to the WCS server

...