Question
TypeError: Stream.destroy is not a function
Hello Adobe geeks!
I am trying to destroy a NetStream published from client -- application.onUnpublish handler
but I get this error: TypeError: Stream.destroy is not a function
Example
The following example destroys a stream called streamA:
// Get a stream.
streamA = Stream.get("clientStream1");
// Destroy the stream.
Stream.destroy(streamA);Call Stream.destroy() to unlink and clean up a stream resource.
application.onUnpublish = function (client /*Client*/, stream /*Stream*/) {
trace("Application.onUnpublish > client " + client.userId + " stopped publishing " + stream.name);
Stream.destroy();
}
How can I remove a stream created by user?
Thanks!
T.
