Skip to main content
Participant
February 15, 2016
Question

disconnect client

  • February 15, 2016
  • 1 reply
  • 457 views

How can i disconnect the client from a stream? For example, i want that the client only can view the stream for 30 seconds, after that i want that the application disconnect the client with

application.disconnect(clientObj)


​How can i do that?

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    February 24, 2016

    Hi,

    There is global function called "setInterval" that can be used in this case. The code would go something like this.

    function disconnectClient (clientObj)

    {

    application.disconnect(clientObj);

    }

    setInetrval(disconnectClient, 30000, clientObj); //30 seconds

    After the application has disconnected you can use clearInterval function so that disconnectClient won't be called again and again.

    For more information you can view this link : Adobe Media Server Help | Global functions

    Hope this helps you.