It appears there's a typo here as we are trying to unsubscribe from the variable "leaving" which is undefined in this scope, shouldn't it be unsubscribeFrom(unpublished) over here?
Good catch, yes that's a typo. Unfortunately I don't have connectivity at home right now: I'm answering from my phone. I'll fix this when it gets back.
https://github.com/meetecho/janus-gateway/blob/4c9bbdd164b28277cd17a4bffcdd5729f1d5bf53/html/mvideoroomtest.js#L260
It appears there's a typo here as we are trying to unsubscribe from the variable "leaving" which is undefined in this scope, shouldn't it be unsubscribeFrom(unpublished) over here?