Results 1 to 2 of 2

Thread: onStreamDestroy not being called

  1. #1
    Join Date
    Jun 2013

    Default onStreamDestroy not being called

    Im creating an video chat application, and I've beeing using the onStreamDestroy method to know when a stream is destroyed, however I've found that a stream is only destroyed when I disconnect the client, but I want to destroy a stream manually at any given time.

    I'm using the IMediaStream interface:

    I've used stream.close(), stream.shutdown() with no luck. I've found that stream.getStreams() gets me a map of all the streams in the current appInstance. and I've tried streams.getStreams.removeStream() but I'm not sure how to use it.

    is there a way to manually destroy a stream (either publish or play stream) that will cast the onStreamDestroy method in the app?

  2. #2



    The best approach would be to find the client associated with the stream and force disconnect the client. You should be able to do

    stream.getClient() for rtmp
    stream.getRTSPStream().getSession() for RTSP

    to get the session and then disconnect it which should fire the onStreamDestroy method.


Similar Threads

  1. onDisconnect not always called?
    By misterd in forum General Forum
    Replies: 2
    Last Post: 09-21-2012, 08:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts