Saturday, November 24, 2012

Dynamic Application Instances - AMS Adobe Media Server / FMS Flash Media Server

While playing around with Adobe Media Server and writing an application for it, I wanted to figure out how to add dynamic applications with custom instance names. I looked through the Administration API trying to figure out how to dynamically generate new application instances (which I refer to as rooms).

The solution was right under my nose the whole time, turns out all you need to do is specify the context when connecting to the application on AMS (even without the application running) and it will create that application with the instance name you provide.

For example
This will connect the to application:
netconnectionvar.connect("rtmp://localhost/chat", params);

And this will create a new instance of the chat application:
netconnectionvar.connect("rtmp://localhost/chat/instancename", params);

Hopefully this will save you quite a bit of time.

No comments: