Getting unexpected error while using openvidu-browser 2.18.0 npm package
When trying to connect to session, this happens.
import { OpenVidu } from "openvidu-browser";
...
this.OV = new OpenVidu();
this.session = this.OV.initSession();
...
this.session.connect(this.token).then(function () {...}
Any ideas?
Front-end environment: vue3, typescript, vite.
Thanks in advance!
I think the bug is fixed in 2.19
Thank you, Micael, will try with 2.19.0
сб, 7 авг. 2021 г., 19:56 Micael Gallego via OpenVidu <openvidu@discoursemail.com>:
Same error appears
What is interesting, everything works fine if i just load openvidu.min.js file like this:
const script = document.createElement("script");
script.src = "URL_TO_JS/openvidu-browser-2.18.0.min.js";
script.setAttribute("data-namespace", "OV");
document.body.appendChild(script);
script.addEventListener("load", () => {
// Script is loaded, get token
let body = { secret: this.secret, room: this.$store.state.user.id };
postFetch("api2/video", body).then((respond) => {
this.token = respond;
// Join session with fetched token
this.joinSession();
});
});
But this is not the best practise i guess, but same just don’t work with import { OpenVidu }…
Something is going wrong when session.connect called.
I think the line throwing an error is this one: openvidu/index.js at master · OpenVidu/openvidu · GitHub
Which means that this import is not properly working in your case, for some reason: openvidu/index.js at master · OpenVidu/openvidu · GitHub
Try setting breaking points in that file and those lines to further investigate why those imports are not working as they should.
RPC Builder seems have some exception [Exception: TypeError: ‘caller’, ‘callee’, and ‘arguments’ properties may not be accessed on strict mode functions or the arguments objects for calls to them at F…
Actually don’t know what to do with this