As @gpolitis reported here , under certain circumstances, the
onended event is not fired, but the problem is not only with
If stream's onended is not fired when participant lefts, his
videocontainter remains hidden as indicated here . So if this
participant comes again (or just refreshes the page), he will not be
visible for other participants (we can only hear him, because his
videocontainer is hidden). Of course, the problem is not related to
the case when when participant's jid is changed, as when we do not use
login form (using anonymousdomain).
Is it possible to fix this issue with not firing this event or it is
somehow a browser bug? If not, we can just check if videocontainer is
hidden, but I suppose it's not so good let old streams to not be
destroyed, which happens often.