(Posted on github as well)
I am getting the following error every time I close a session:
@zoom_videosdk-ui-toolkit.js?v=dc969869:33346 Uncaught (in promise)
ObjecterrorCode: 5007
reason: "only host can do the operation"
type: "INSUFFICIENT_PRIVILEGES"
This error happens only with @zoom/videosdk-ui-toolkit version 2.1.10-1, it does not happen with version 2.1.0-1
You can replicate this error with the sample apps, like the React sample app:
videosdk-ui-toolkit-react-sample
or the Angular sample app:
videosdk-ui-toolkit-angular-sample
The issue gets triggered during session cleanup, at the following instruction :
uitoolkit.closeSession(sessionContainer)
After a first call, all subsequent attempts to start a session fail.
I checked the uitoolkit test page. There this issue does not occur.
By looking at the js script, the uitoolkit.onSessionClosed
callback function does not call
uitoolkit.closeSession(sessionContainer)
.
Instead, there is another callback that is not suggested in the documentation guides:
...
uitoolkit.onSessionDestroyed(sessionDestroyed)
...
const sessionDestroyed = () => {
console.log("session destroyed");
uitoolkit.destroy();
};
Questions:
Do we need to use the uitoolkit.destroy
instead of uitoolkit.closeSession
?
If that is the case, I would have expected to call uitoolkit.destroy
when the uitoolkit.onSessionClosed
is fired.
Documentation is not clear, can you please shed some lights on this?