Versions Compared

Key

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

...

Supported platforms and browsers


Chrome

Firefox

Safari 11

Edge

Windows

+

+


+

Mac OS

+

+

+


Android

+

+



iOS

-

-

+



Supported codecs

  • Video: H.264
  • Audio: AAC, G.711, Speex 16

...

REST-methods and response statuses

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",
"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

Parameters

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

options

Transponder options

{"action": "mute"}

mediaSessionId

Unique identifier of the transponder

eume87rjk3df1i9u14elffga6t

width

Image width

320

height

Image height

240

muted

Is sound muted

true

soundEnabled

Is sound enabled

true

soundFile

Sound file

test.wav

loop

Loop playback

false

 

The options parameter can be used to turn off audio or insert audio from a file when creating a transponder.

...

If the server the stream is republished to has certain requirements to the name (FacebookYoutube), this line must be commented out.

The option

Code Block
languagebash
themeRDark
rtmp_transponder_full_url=true

turns on a possibility to pass some request parameters to RTMP server.

Parameters passing in server URL

It is possible to pass some parameters to server. to which a stream should be republished. Parameters to pass are specified in server URL, e.g.

Code Block
languagejs
themeRDark
rtmp://myrtmpserver.com:1935/live/stream?param1=test1&param2=test2

To use the feature, the following option must be set in flashphoner.properties file

Code Block
languagebash
themeRDark
rtmp_transponder_full_url=true

When REST query  /push/startup is sent to WCS server or createstream() method is called with parametes

Code Block
languagejs
themeRDark
{
"streamName": "rtmp_test",
"rtmpUrl": "rtmp://myrtmpserver.com:1935/live/stream?param1=test1&param2=test2"
}

RTMP-server will receive the request on connection establishing to republish stream as follows

Code Block
languagejs
themeRDark
onConnect: AMFDataList: [0] connect, [1] 1.0, [2] object
{Obj[]: app: "live/stream?param1=test1&param2=test2", type: "nonprivate", flashVer: "FMLE/3.0 (compatible; Lavf54.59.106)", swfUrl: "rtmp://myrtmpserver.com:1935/live/stream?param1=test1&param2=test2", tcUrl: "rtmp://myrtmpserver.com:1935/live/stream?param1=test1&param2=test2"}

Automatic republishing to a specified RTMP server

...