Publishing to Transcoder (Flash)
Publishing to Transcoder with Flash
Publishing using Flash/RTMP over the Stream Manager does not require a proxy as WebRTC-based publishers do. The reason being that it is not a requirement to publish over SSL from the Flash Player plugin. As such, the configuration for a Flash-base publisher over the Stream Manager is similar to that of a publisher not over Stream Manager – the only difference is to point to the Origin endpoint.
Given that the respone to the GET
request at:
https://yourstreammanager.com/streammanager/api/3.1/event/live/mystream?action=broadcast&transcode=true
is the following:
{
"serverAddress": "10.0.0.0",
"scope": "live",
"name": "mystream_1"
}
Your initialization configuration for an RTMPPublisher
will look like the following (in following with the above examples):
(function (red5prosdk) {
var publisher = new red5prosdk.RTMPPublisher()
publisher.init({
host: '10.0.0.0',
app: 'live',
streamName: 'mystream_1',
protocol: 'rtmp',
port: 1935,
mediaConstraints: {
audio: true,
video: {
width: 1280,
height: 780
bandwidth: 1000
}
}
})
.then(function () {
publisher.publish()
})
.catch(function (e) {
console.error(e)
})
})(window.red5prosdk)
The above is a very basic configuration. Your webapp may need additional configurations depending on requirements and deployment.