Hi @Robert.Wallis , @MaxM ,
first of all: thanks a lot for your replies. I am already using the dimensions of the renderTarget property. But I guess you answered with this my question whether I can use the device resolution to just draw the images which seems to not be the case.
Regarding your suggestion: you were right and the error message was just not stringified and only the code was present. Gonna get back to those shortly… Regarding drawWebView: I cannot draw the web view. The webview stays on the side as a control panel and has a completely different UI to what I actually draw (images), which would also be fine. BUT:
Now, sadly my “fight” is still far from over Now that I have moved to drawImage from setVirtualForeground based on Max’s answer, I found the issue with running a “camera” rendering context:
- I get either {message: “success”} as a result or
- error 10063: The app already called render Js-api first.
in either case, getRunningContext returns “inMeeting”. I get a short white flash when initializing the context and then right after (even with message: success) getRunningContext returns “inMeeting”. In general drawing images works, however, sometimes (every 10 draws maybe) I get a spontaneous:
- 10001:The zoom client encountered an error while processing the request.{“imageId”:…}
Which could be related to the initialization?
Here the code…
(async () => {
const configResult = await zoomSdk.config({
capabilities: [
'runRenderingContext',
'closeRenderingContext',
'drawImage',
'clearImage',
]
});
try {
const result = await zoomSdk.runRenderingContext({view: "camera"});
console.log(result); // sometimes {message: success}, if not thrown
const context = await zoomSdk.getRunningContext();
console.log(context); // *always* inMeeting, expected inCamera
} catch (error) {
console.log(error);
}
})()
I figured by now, that the 10063 comes, when I reload the app without exiting and closing the app. The reload doesn’t close the context and a new initialization is returning the error. The other case however makes no sense to me. I have seen another post here referring to the same issue which was related to a bugfix and was resolved with specifying a version in the config call, but in my case I am using the latest npm package, so I assume a version identifier would make no sense.
I have tried so far: reinstall my app, reboot. None worked.
Any suggestions would be highly appreciated, as it is the only missing part to finalize my product.
Cheers,
Chris