Skip to main content
Participating Frequently
January 2, 2007
Question

Stoping a client live published stream, server side

  • January 2, 2007
  • 1 reply
  • 396 views
Hello buddies,
I have a very very important and urgent question.

Suppose in some client a stream is being published live with the name 'A'. now, if some other client should and tries to publish with the same name ('A'), it will encounter a 'NetStream.BadName' status error code, to avoid that I think there should be some way to stop the stream('A') server side, and then let the 2nd client starts publishing with name 'A'. if so, how can I stop 'A' stream on server?

Thank you so much for any help
    This topic has been closed for replies.

    1 reply

    January 2, 2007
    Let your server call a function (on the first client that publishes the stream A) that stops the publishing and shows show local message to that client e.g. "another client has started to publish a stream with the same name".

    It's unclear why you want such a system because you don't fix the problem ; you fix the symptoms. If you let clients publish a stream related to their loginname for example you will always have unique streams on your server.

    If you let them connect to an unique instance of your application you don't even have the problem of non-unique stream-names because inside every instance you can publish stream A again.

    Viewing clients would connect to each instance if they want to see that particular stream, like rtmp://yourserver.com/appnameXYZ/instancenameABC/A

    where A is the name of your published stream in instance "instancenameABC" , which is a child of application called "appnameXYZ".

    DeniomAuthor
    Participating Frequently
    January 2, 2007
    Thank you so much for your reply.
    I was aware of the method that you suggested, but as I noted I am looking for a server-side method that forces a client piblished live stream to be stopped, instead of asking the client itself to do it.

    Any more idea?