]> git.proxmox.com Git - mirror_novnc.git/blobdiff - docs/API.md
Add ability to set compression level
[mirror_novnc.git] / docs / API.md
index ae7fb664dd359fd64825bd05ab83403224d81904..59b7cf17418c1b432726c7c8e4fb726abdc80cd8 100644 (file)
@@ -24,7 +24,7 @@ protocol stream.
 `focusOnClick`
   - Is a `boolean` indicating if keyboard focus should automatically be
     moved to the remote session when a `mousedown` or `touchstart`
-    event is received.
+    event is received. Enabled by default.
 
 `touchButton`
   - Is a `long` controlling the button mask that should be simulated
@@ -58,6 +58,25 @@ protocol stream.
     instead of a zero-sized or fully-transparent cursor if the server
     sets such invisible cursor. Disabled by default.
 
+`background`
+  - Is a valid CSS [background](https://developer.mozilla.org/en-US/docs/Web/CSS/background)
+    style value indicating which background style should be applied
+    to the element containing the remote session screen. The default value is `rgb(40, 40, 40)`
+    (solid gray color).
+
+`qualityLevel`
+  - Is an `int` in range `[0-9]` controlling the desired JPEG quality.
+    Value `0` implies low quality and `9` implies high quality.
+    Default value is `6`.
+
+`compressionLevel`
+  - Is an `int` in range `[0-9]` controlling the desired compression
+    level. Value `0` means no compression. Level 1 uses a minimum of CPU
+    resources and achieves weak compression ratios, while level 9 offers
+    best compression but is slow in terms of CPU consumption on the server
+    side. Use high levels with very slow network connections.
+    Default value is `2`.
+
 `capabilities` *Read only*
   - Is an `Object` indicating which optional extensions are available
     on the server. Some methods may only be called if the corresponding
@@ -181,6 +200,10 @@ connection to a specified VNC server.
       - A `DOMString` specifying the ID to provide to any VNC repeater
         encountered.
 
+    `wsProtocols`
+      - An `Array` of `DOMString`s specifying the sub-protocols to use
+        in the WebSocket connection. Empty by default.
+
 #### connect
 
 The `connect` event is fired after all the handshaking with the server