Rebooting or Shutting Down Host #29
-
|
I do have a brief idea of implementing the disconnect method by |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Currently, there are no methods in <VncScreen
url={vncUrl}
scaleViewport
debug
ref={vncScreenRef}
onConnect={(rfb) => {
console.log('connected', rfb);
}}
/>You can use a function App() {
const vncRfb = useRef(null);
const vncScreenRef = useRef<React.ElementRef<typeof VncScreen>>(null);
return (
<VncScreen
url={vncUrl}
scaleViewport
debug
ref={vncScreenRef}
onConnect={(rfb) => {
console.log('connected', rfb);
vncRfb.current = rfb;
}}
/>
)
}You can use this |
Beta Was this translation helpful? Give feedback.
-
|
In #26, I've exposed the function App() {
const vncScreenRef = useRef<React.ElementRef<typeof VncScreen>>(null);
return (
<VncScreen
url={vncUrl}
scaleViewport
debug
ref={vncScreenRef}
/>
)
}You can access the |
Beta Was this translation helpful? Give feedback.
-
|
In #28 , I've also added support for the following methods from So, you could just do |
Beta Was this translation helpful? Give feedback.

In #28 , I've also added support for the following methods from
RFBSo, you could just do
vncScreenRef.current?.machineShutdown()from the above example.