将videoroom插件附加到Janus后,在“成功”回调中,我向它发送同步消息
janus.attach(
{
plugin: "janus.plugin.videoroom",
opaqueId: opaqueId,
success: function(pluginHandle) {
roomMaster = pluginHandle;
var isExist = {
"request" : "exists",
"room" : myroom
};
roomMaster.send({"message": isExist})
},
并从janus.js
在控制台中获得响应,但在documentation中则告诉该插件将向我发送response
消息。而且我不明白-在哪里可以抓到它?
onmessage: function(msg, jsep){
// is fired only after sending async requests like "join", "start" - not "exists"
conslole.log(msg);
}
有人知道吗?
谢谢
答案 0 :(得分:2)
您可以在请求对象中定义成功回调:
roomHandle.send({
"message" : {
request : 'list'
},
success: function(result) {
console.log(result);
}
});