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?