sjkummer / janus-gateway-js

Janus-gateway WebRTC client for Node.js and the browser.
MIT License
172 stars 55 forks source link

Missing handlers for `webrtcup`, `media`, `hangup` #87

Closed vogdb closed 7 years ago

vogdb commented 8 years ago

I've checked. When hangup is received janus connection does not break, session does not destroy, plugin does not detach. Seems it is only about having media stream?

vogdb commented 8 years ago

Verified. Media breaks and we need to reconnect to room/mountpoint.

vogdb commented 8 years ago

Now I think that we can even ignore those events. If use needs those events, he can do this:

plugin.on('message', function(message){
  switch (message['janus']) {
    case 'webrtcup':
    case 'hangup':
    case 'media':
      //do whatever you want.
      break;
  }
})

@zazabe your thoughts?

vogdb commented 8 years ago

well, here are the changes. @zazabe please reject/confirm them. I'm still unsure about having them. btw the original janus.js does not have callbacks for those events https://janus.conf.meetecho.com/docs/JS.html

vogdb commented 8 years ago

@zazabe wdyt?

zazabe commented 7 years ago

I think only hangup is useful as an event, others could be catch by listening on message as you said.

vogdb commented 7 years ago

@zazabe please review

zazabe commented 7 years ago

lgtm!