in a recent Flex project I need to build the following:
- a video player (for live video)
- a userlist
- a chatpod
for the video player I want to use OSMF/SMP of course. The application connects against FMS with some custom authentication logic implemented in SSAS on the FMS. This works like this:
- user request HTML page that embeds Flex app / SWF
- server serves HTML page and adds token and IDs to the HTML page (FlashVars for the SWF)
- the Flex app reads those params in
Next, I need to create a custom NetConnection and pass over the token and the IDs. These get checked on the FMS server by issueing a remoting call to a backend system. If the check is positive, FMS calls application.acceptConnection(client), otherwise the client is rejected. This works fine with a vanilla NetConnection.
Now, as I also have some FMS logic in place which refuses new clients to connect based on a configuration parameter (e.g. max number of concurrent clients) I really need to reuse the same NetConnection for all 3 UI elements: the video player, the user list and the chat pod. So I think I have two options here:
1) setup the NetConnection by hand and make OSMF/SMP use it (by injection or whatever - but I have no clue what would be the correct hook for it)
2) adjust the corresponding code / monkey patch OSMF/SMP which sets up the NetConnection (again - where should I do that)
I would really like to take adantage of the built-in connection manager in OSMF which by itself figures out how to connect and tries all the different protocols and ports. What I did so far is that I tried just pass the parameters by using a StreamingURLResource (as discussed here: http://forums.adobe.com/message/2652556). This allows for passing parameters to FMS but I found that these parameters are not reapplied when the Player looses its connection and tries to reconnect... so these parameters are not "persistent"
Btw, current config is Flex SDK 4.1 and OSMF 1.5 targeting FP 10.1