Skip to main content
calmchessplayer
Inspiring
Jun 16, 2010 12:53 AM UTC
Answered

onStatus returns wrong codes??

I'm using the following code to record a stream on the server side,,,,,,the problem is onStatus only reports NetStatus.data.start and no other codes i don't even know what the code it does returns means as it is undocumented .....how can i make onStatus report properly?

Client.prototype.RecStream = function(adName,insID){
this.recordStream = Stream.get(adName);
this.recordStream.onStatus = function(info) {
  trace(info.code);
  }
this.recordStream.record("record",30);
application.adminObj[adName].recStat="Recording";
}

    This topic is closed to new replies. Start a new post to keep the conversation going.
    amit_krCorrect answer
    Adobe Employee
    Jun 17, 2010 6:33 AM UTC

    Hi,

    I am publishing stream name "sample". You need to get the Stream instance on different name other than what you are publishing and also you need to play the live stream published to the application so that you can receive the status messages on server side, so you get the status messages in the following order:

    2010-06-17 11:50:03 2912 (s)2641173 Inside RecStream... -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Publish.Start -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Play.Reset -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Play.Start -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Data.Start -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Record.Start

    Code Snippet

    ---------------------

    Client.prototype.RecStream = function(adName,insID)
    {
    this.recordStream = Stream.get("hello");
    this.recordStream.onStatus = function(info) {
            trace(info.code);
    }
    this.recordStream.play("sample");
    this.recordStream.record("record",30);

    application.adminObj[adName].recStat="Recording";
    }

    Regards,

    Amit

    2 replies

    amit_krCorrect answer
    Adobe Employee
    Jun 17, 2010 6:33 AM UTC

    Hi,

    I am publishing stream name "sample". You need to get the Stream instance on different name other than what you are publishing and also you need to play the live stream published to the application so that you can receive the status messages on server side, so you get the status messages in the following order:

    2010-06-17 11:50:03 2912 (s)2641173 Inside RecStream... -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Publish.Start -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Play.Reset -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Play.Start -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Data.Start -

    2010-06-17 11:50:03 2912 (s)2641173 NetStream.Record.Start

    Code Snippet

    ---------------------

    Client.prototype.RecStream = function(adName,insID)
    {
    this.recordStream = Stream.get("hello");
    this.recordStream.onStatus = function(info) {
            trace(info.code);
    }
    this.recordStream.play("sample");
    this.recordStream.record("record",30);

    application.adminObj[adName].recStat="Recording";
    }

    Regards,

    Amit

    Translate
    calmchessplayer
    Inspiring
    Jun 17, 2010 8:28 AM UTC

    Thanks alot that worked awesome

    Translate