sjkummer / janus-gateway-js

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

Split current plugin name on package and name #93

Closed vogdb closed 7 years ago

vogdb commented 7 years ago

@zazabe please review

zazabe commented 7 years ago

if it's about getting the name used in janus response to notify about a specific action/event, like "streaming": "list" in https://github.com/cargomedia/janus-gateway-rtpbroadcast#list, just be careful, because not all plugins use the last part of the package name as this name. (eg. package=janus.plugin.cm.rtpbroadcast / name-in-response=streaming).

If it's about that, maybe you could override getShortName() of RtpbroadcastPlugin plugin?

vogdb commented 7 years ago

if it's about getting the name used in janus response to notify about a specific action/event, like "streaming": "list"

yes. Now I'm thinking that it will be useful to have two methods:

Both of them should explicitly state names without any implicit logic like "the last part of the package name". Possibly #94 might solve this if we introduce a hierarchy of Transaction/PluginResponses for plugins.

vogdb commented 7 years ago

@zazabe please review

zazabe commented 7 years ago

maybe integration tests should be updated then? or there's something in preparation to avoid response.getData(plugin.getResponseAlias())?

vogdb commented 7 years ago

they will be updated in #94