Skip to main content
Inspiring
October 6, 2011
Question

NetStream.Publish.BadName

  • October 6, 2011
  • 2 replies
  • 6996 views

Hello!

what could be the problem if an "NetStream.Publish.BadName" event fires?

Scenario:

1) I connect to an empty netgroup

2)  fms connets through rtmfp to the same netgroup and starts publishing netstream to that netgroup

I receive these events:

NetGroup.Connect.Success                     // I connect to empty netgroup

NetGroup.Neighbor.Connect                     // fms connects to the same netgroup

NetGroup.MulticastStream.PublishNotify  // fms starts to publish stream

NetStream.Play.Reset

NetStream.Play.Start

NetStream.MulticastStream.Reset

NetStream.Publish.BadName                 // ERROR!!!!???

any idea?

    This topic has been closed for replies.

    2 replies

    kahsbnxasxwasx
    Known Participant
    October 13, 2011

    I also had the problem, FMS4.5 not the problem WHY??????????????

    kahsbnxasxwasx
    Known Participant
    October 13, 2011

    How do I subscribe to, I also encountered this problem, the code can provide support, the light that no use ah

    Adobe Employee
    October 7, 2011

    Are you also trying to publish with same stream name in your code after FMS has started publishing?

    Inspiring
    October 7, 2011

    SE_0208 wrote:

    Are you also trying to publish with same stream name in your code after FMS has started publishing?

    No, I am not. FMS is the only publisher.

    I found when the error doesn't happens:

    1) FMS connects to empty netGroup through rtmfp and starts publishing,

    2) I connect to the same netgroup in a couple of second. If I connect to the netgroup the same moment as FMS starts publishing I get the error BadName.

    The error happens when:

    1) I connect to an empty netgroup

    2) FMS connects to the same netGroup through rtmfp and starts publishing.

    !!! Everything works if on the event "NetGroup.MulticastStream.PublishNotify" I set timer (pause) for a couple of seconds and play the stream on timer complete.

    So the conclusion is that something happens when FMS starts to publish the stream to the netgroup. On the FMS side I publish stream like this:

    groupSpecifier = new GroupSpecifier("test_group");

    groupSpecifier.multicastEnabled = true;

    groupSpecifier.postingEnabled = true;

    groupSpecifier.serverChannelEnabled = true;  

    groupNetConnection = new NetConnection();            

    groupNetConnection.onStatus = function( info ){ 

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

              netGroup = new NetGroup(groupNetConnection, groupSpecifier);                    

             

              ns = new NetStream(groupNetConnection, groupSpecifier);           

              ns.onStatus = function(info){                

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

                             ns.attach(stream);                       

                             ns.publish(stream.name, "live");                           

                       }

               }                                       

          }           

    }

    groupNetConnection.connect("rtmfp://testhost/testapp/"+roomName);

    Where could be the problem?

    Nikhil_Kalyan
    Participating Frequently
    October 7, 2011

    Hi,

    Thanks for trying RTMFP.

    I didn't fully understand what is the scenario you are trying. Can you please explain that, so that it gives clarity to modify the scripts ?

    One suggestion I can make is that, the way you created netgroup after the netconnection is sucessful, you shoudd also wait for netgroup to first create (wait for NetGroup.Connect.Success) and then create a netstream. Much better option would be to wait till NetGroup.Neighbor.Connect is recieved and then starting to publish. This way, the asynchronous events are tracked, and there won't be a need for timers, hopefully.

    Thank you  !