Skip to main content
Participant
May 19, 2011
Question

Invoke server-side application method by Administrator API

  • May 19, 2011
  • 1 reply
  • 502 views

Hi!

By using Administration API I would like to invoke a method from myApplication.asc

I only found the broadcastMsg() method but AFAIK it omits FMS and broadcast Msg directly to users.

http://myIP:1111/admin/broadcastMsg?auser=myUser&apswd=myPassword&scope="App:myAplication"&method="testMethod"&arg0="123"&arg1="456"

And it works.

The ideal thing it would be if I could invoke methods from my main.asc. e.g.

application.onAppStart = function() {

}

application.testMethod1 = function(arg1, arg2) {

     //maybe this way?

}

application.onConnect = function(newClient, userData) {

     newClient.testMethod2 = function(arg1, arg2) {

          // or this way?

     }

}

Client.prototype.testMethod2 = function(newClient, userData) {

     //or maybe this way?

}

Is there any way to invoke those methods not using a flash swf file?

T76

    This topic has been closed for replies.

    1 reply

    May 19, 2011

    I don't know of any way of doing this through the admin service (nor through a C++ plugin, but there might be something I missed there)

    I found the quickest route was to proxy the http requests through PHP using php-rtmp. YMMV.

    http://code.google.com/p/php-rtmp-client/

    taurus76Author
    Participant
    May 20, 2011

    Works great, thanks Jay!