I used this workaround in order to not have 2 servers and just use red5 plugin.
In order to publish a live stream, client side you have to do the following steps:
- Create a net connection to red5 plugin:
var conn:NetConnection = new NetConnection(“rtmp://red5addr/oflaDemo”);
where red5addr is the same of openfire.
2)Create a netstream object representing your stream:
var myStream:NetStream = new NetStream(conn);
3)Attach camera or/and michrophone to stream
4)Publish the stream with a name:
Now, as stream name, I chose my jid on openfire: this way a person wanting to receive my stream has already stream name, as he knows my jid being in the same conference (important: you’ll have to cast jid in string using toString() method. Using jid won’t lead to any compile error but streaming will not work).
In order to receive stream you have to create another net stream object client side:
Basic stream is automatically supported in red5 so you don’t have to write any server-side application at all, just make sure oflaDemo is installed among red5’s default applications (and it surely is if you use red5 plugin). Obviousely, if you need some more complicated use, you’ll have to write your own red5 application.