# RealTime View

This HTML sets up a **VNC Viewer** using the **noVNC** library, allowing connection to a remote desktop session via WebSockets.\
For public mode, the base url **api.tasknet.co** followed by **/vnc/sessionUUIID**

```html
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>VNC Viewer</title>
    </head>
    <body>
        <div id="main__content">
            <div class="vnc__screen">
                <div id="screen">
                    <!-- This is where the remote screen will appear -->
                </div>
            </div>
        </div>
        <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/@hostnet/novnc@1.0.0/dist/novnc.min.js"></script>
        <script type="module">
            // Configure your VNC connection details here
            let rfb
            let desktopName
            let sessionUUIID = "<your-session-uuid>"
            const SESSION_URL = "wss://vnc.tasknet.co/sessionUUIID"
            function connectVNC() {
                // Creating a new RFB object will start a new connection
                rfb = new RFB(
                    document.getElementById('screen'), 
                    SESSION_URL,
                    // IF passowrd is required
                    //{ credentials: { password: password } }
                )

                // Set parameters that can be changed on an active connection
                rfb.viewOnly = false
                rfb.scaleViewport = false   
            }

            $(document).ready(() => {
                $("#disconnect__button").on("click", function() {
                    rfb.disconnect()
                })
                // Connect immediately
                connectVNC()
            })
        </script>
    </body>
</html>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev-docs.tasknet.co/guides/realtime-view.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
