I was trying to follow Janus videoroom example but I have an error when calling attach on janus instance:
janus.nojquery.js:681 200: Could not parse response, error: ReferenceError: adapter is not defined, text: {
"janus": "success",
"transaction": "Y0WiAA79RQ9l",
"data": {
"id": 7571647455176760
}
}
This doesnt allow me to get videoroom pluginHandle so I cant communicate with plugin.
below is codesnipet that I try to make work:
Janus.init({debug: "all", callback: function() {
const janusInstance = new Janus(
{
server: 'http://localhost:1414/janus',
success: function () {
console.log('connected', janusInstance)
janusInstance.attach(
{
plugin: "janus.plugin.videoroom",
opaqueId: Janus.randomString(12),
success: function (pluginHandle) {
console.log('plugin handle received', pluginHandle)
},
onmessage: function(msg, jsep) {
console.log(msg, jsep)
},
onlocalstream: function(stream) {
console.log(stream)
},
error: function (error) {
console.error(error)
}
}
)
},
error: function(error) {
console.error(error)
}
})
}})
as Janus server I use served locally docker image: https://github.com/canyanio/janus-gateway-docker
any help will be highly appreciated. Thank you!