Closed ntustzeus closed 1 year ago
Session.Disconnect does not stop/clear the publisher video. For that you need to call publisher.PublishVideo = true/false. Calling publisher.Dispose() would also do the trick but it might be a bit more than you're asking for. This will also clear the last image in the remote subscriber video. Have in mind that there use to be a bug here where last publisher image remained frozen when switching off video, but this has been fixed in latest versions (2.24.2 or higher, I believe).
Also, although you've already contemplated this scenario I'll add the following just in case. For a subscriber video the thing is a bit more complicated. If a subscriber disconnects from the session you don't normally want to clear the subscriber VideoRenderer with a black screen. You would normally remove the VideoRenderer completely for that subscriber. Check sample "SimpleMultiparty" to see how subscribers add added or removed when they connect/disconnect.
Please let me know if this doesn't answer your doubts.
From example we know how to show the video stream
When I call Session?.Disconnect(), the publisher's view still working and suscriber's view stay in the last image.
I want to clear the publisher and suscriber's view to empty, how can I do it?