Skip to main content
Participant
February 11, 2011
Question

Admin API fail :: NetConnection.Admin.CommandFailed

  • February 11, 2011
  • 1 reply
  • 786 views

I want recieve infomation for recorded stream in FMS Server.

so, i tried use Admin api(getRecordedStreams or getNetStreams).

but, returned below code : NetConnection.Admin.CommandFailed .

What is wrong?

Below  my code :

import flash.net.NetConnection;

import flash.net.NetStream;

import flash.events.*;

var nc:NetConnection;

var resp:Responder;

function onCallSuccess(resObj):void {

  for (var i in resObj) {

     trace("NetStream Top Level data:"+i);

     trace("NetStream Top Level value:"+resObj);

     if (i.toString() == "data") {

        for (var j in resObj) {

           trace("NetStream Low Level Data:"+j);

           trace("NetStream Low Level Value:"+resObj);

        }

     }

  }

}

function script_ncStatus(event:NetStatusEvent):void {

   var info:Object = event.info;

    if (info.code == "NetConnection.Connect.Success") {

      nc.call("getRecordedStreams",resp,"clia/_definst_");  // clia is Application name

    }

}

nc = new NetConnection();

resp= new Responder(onCallSuccess,null);

nc.addEventListener(NetStatusEvent.NET_STATUS, script_ncStatus);

nc.connect("rtmp://localhost:1111/admin","clia","0903");  //admin name : clia, admin password : 0903

    This topic has been closed for replies.

    1 reply

    February 11, 2011

    Hi,

    Can you check your User.xml and see if AdinCommands/HTTPCommands/Allow tag allows cal to this admin command. By default only ping is allowed. If you want to enable calls to all Admin Commands, you can set this to All.

    Thanks,

    Abhishek