You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@roerohan, Assigning an ID (taking it from the props) for the canvas helps capture a screen shot by using the canvas.toDataURL(type, encoderOptions); browser API
This would be a really useful feature.
The text was updated successfully, but these errors were encountered:
You could use the rfb object that's exposed with the onConnect method:
functionApp(){constvncRfb=useRef(null);constvncScreenRef=useRef<React.ElementRef<typeofVncScreen>>(null);useEffect(()=>{// Assuming that `canvasId` is definedvncRfb.current?._canvas?.id=canvasId;},[vncRfb.current]);return(<VncScreenurl={vncUrl}scaleViewportdebugref={vncScreenRef}onConnect={(rfb)=>{console.log('connected',rfb);vncRfb.current=rfb;}}/>)}
I think you could use the second approach here, I'm not really in favor of adding a canvasId prop in the library - unless you can tell me if there are any issues with this approach, or if assigning it in the library is better in any way.
@roerohan, Assigning an ID (taking it from the props) for the canvas helps capture a screen shot by using the
canvas.toDataURL(type, encoderOptions);
browser APIThis would be a really useful feature.
The text was updated successfully, but these errors were encountered: