...
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
...
- HTTP: http://streaming.flashphoner.com:90918081/rest-api/push/startup
- HTTPS: https://streaming.flashphoner.com:88888444/rest-api/push/startup
Where:
- streaming.flashphoner.com - is the address of the WCS server
- 9091 8081 - is the standard REST / HTTP port of the WCS server
- 88888444 - is the standard HTTPS port
- rest-api - is the required prefix
- /push/startup - is the REST-method used
REST-methods and response statuses
REST-method | Example of REST query body | Example of response | Response statuses | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/push/startup |
|
| 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 |
|
| 404 - Transponder not found 500 - Internal error | Find transponders by a filter | ||||||||||||||
/push/find_all |
|
| 404 - Not found any transponder 500 - Internal error | Find all transponders | ||||||||||||||
/push/terminate |
|
| 404 - Not found transponder 500 - Internal error | Terminate operation of the transponder | ||||||||||||||
/push/mute |
| void | 404 - Not found transponder 500 - Internal error | Turn off audio | ||||||||||||||
/push/unmute |
| void | 404 - Not found transponder 500 - Internal error | Turn on audio | ||||||||||||||
/push/sound_on |
| 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 |
| 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 | |
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 (Facebook, Youtube), this line must be commented out.
The option
Code Block | ||||
---|---|---|---|---|
| ||||
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 | ||||
---|---|---|---|---|
| ||||
rtmp://myrtmpserver.com:1935/app_name/?user=user1&pass=pass1 |
or, if a stream supposed to be published to a specified instance of RTMP server application
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp://myrtmpserver.com:1935/app_name/app_instance/?user=user1&pass=pass1 |
Where
- myrtmpserver.com is the RTMP server name
- app_name is the application on the RTMP server name
- app_instance is the instance name of the RTMP server application
Stream name is set in REST query /push/startup parameter 'streamName' or in corresponding stream creation option.
This is the example on RTMP connection establishing with query parameters passing
Stream name passing in server URL
In some cases, a stream publishing name shoukd be passed in the server URL. To do this, the following option must be set in flashphoner.properties file
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp_transponder_full_url=true |
Then, the URL to publish should be set in REST query /push/startup 'rtmpUrl' parameter or in corresponding stream creation option like this:
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp://myrtmpserver.com:1935/app_name/stream_name |
or, to publish to another application instance
Code Block | ||||
---|---|---|---|---|
| ||||
rtmp://myrtmpserver.com:1935/app_name/app_instance/stream_name |
In this case, 'streamName' parameter or REST query /push/startup or corresponding stream creation option is ignored.
Automatic republishing to a specified RTMP server
WCS server can automatically republish all the streams published to a specified RTMP server. To activate this feature, set the next options in flashphoner.properties file:
...