Skip to main content
Known Participant
September 20, 2010
Answered

FMS and audio conference

  • September 20, 2010
  • 1 reply
  • 1677 views

Hello guys, i'm using the Flash Media Development Server 4 to test and implement an audio conference. I'm having some troubles. I'm implementing this audio conference as follow:

1 - An audio stream is created to an specific name;

2 - If a stream with the name specified already exists another name is passed and it's republished with this name.

I don't know if this is the best approach, but i couldn't figure out how to publish more than one microphone in the same stream.

Well the problem is that the first stream is created successfully, but when the other user create the second stream channel, it's suddenly unpublished. I used the admin area of the FMS to see what's happening and i saw that the other stream is created but without a publisher and the client that should be publishing is with an idle status. The clients often receive a "NetStream.Play.InsufficientBW" code when the second stream is created.

Is this a limitation of the FMS Development version or should i use another approach to implement this functionality?

Regards.

    This topic has been closed for replies.
    Correct answer

    Is the debugger showing any exceptions when this happens? I haven't tried the same approach you're using, but in the case of the NetConnection class, you can't invoke certain methods from within the status handler. I'm wondering if the same is true for the NetStream class (i.e you can't invoke publish() from within the status hander).

    1 reply

    September 20, 2010

    To answer the first issue, you can't publish multiple sources to a single stream.

    As for the issue with unique streams, it's sort of hard to understand what you're saying there.Can you explain what you mean by "create the second stream channel", and perhaps post your code?

    The developer edition is functionally identical to the licensed interactive server, so that should not be an issue.

    Known Participant
    September 20, 2010

    Hello JayCharles thank you for the quick answer.

    Well, the code i'm using is something like this:

    channelName = "channel-name";

    this.audioPublishingStream = new NetStream( this.netConnection );

    this.audioPublishingStream.attachAudio( microphone );

    this.audioPublishingStream.addEventListener( NetStatusEvent.NET_STATUS, netStatusHandler );

    audioPublishingStream.publish( channelName, "live" );

    function netStatusHandler(event:NetStatusEvent):void

    {

    if ( event.info.code == "NetStream.Publish.BadName" )

    {

    channelName = "another-name";

    audioPublishingStream.publish( channelName, "live" );

    }

    else if ( event.info.code == "NetStream.Publish.Start" )

    {

    audioBeingPresented = true;

    }

    else if ( event.info.code == "NetStream.Play.UnpublishNotify" )

    {

    stopPresentingAudio();

    }

    if ( event.info.code == "NetStream.Play.InsufficientBW" )

    {

    Alert.show( "There isn't enough bandwith" );

    }

    }

    Well, as you can see i publish a stream in a specific channel name and if the stream result is equal to a code saying that this name can't be used, i use another name to publish it. The code isn't exactly like that but the idea is just like this.

    Any ideas about it?

    Regards.

    Correct answer
    September 20, 2010

    Is the debugger showing any exceptions when this happens? I haven't tried the same approach you're using, but in the case of the NetConnection class, you can't invoke certain methods from within the status handler. I'm wondering if the same is true for the NetStream class (i.e you can't invoke publish() from within the status hander).