@novnc/novnc 1.5.0-g43326eb → 1.5.0-g4e410a0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +1 -1
- package/README.md +24 -23
- package/docs/LIBRARY.md +1 -1
- package/lib/crypto/md5.js +1 -1
- package/lib/decoders/copyrect.js +1 -1
- package/lib/decoders/h264.js +1 -1
- package/lib/decoders/hextile.js +1 -1
- package/lib/decoders/jpeg.js +1 -1
- package/lib/decoders/raw.js +1 -1
- package/lib/decoders/rre.js +1 -1
- package/lib/decoders/tight.js +1 -1
- package/lib/decoders/tightpng.js +1 -1
- package/lib/decoders/zlib.js +1 -1
- package/lib/decoders/zrle.js +1 -1
- package/lib/deflator.js +1 -1
- package/lib/display.js +1 -1
- package/lib/encodings.js +2 -1
- package/lib/inflator.js +1 -1
- package/lib/input/domkeytable.js +1 -1
- package/lib/input/fixedkeys.js +1 -1
- package/lib/input/gesturehandler.js +1 -1
- package/lib/input/keyboard.js +1 -1
- package/lib/input/vkeys.js +1 -1
- package/lib/rfb.js +228 -93
- package/lib/util/browser.js +62 -8
- package/lib/util/cursor.js +1 -1
- package/lib/util/element.js +1 -1
- package/lib/util/events.js +1 -1
- package/lib/util/eventtarget.js +1 -1
- package/lib/util/int.js +1 -1
- package/lib/util/logging.js +1 -1
- package/lib/util/strings.js +1 -1
- package/lib/websock.js +6 -6
- package/package.json +2 -3
package/LICENSE.txt
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## noVNC: HTML VNC
|
|
1
|
+
## noVNC: HTML VNC client library and application
|
|
2
2
|
|
|
3
3
|
[](https://github.com/novnc/noVNC/actions?query=workflow%3ATest)
|
|
4
4
|
[](https://github.com/novnc/noVNC/actions?query=workflow%3ALint)
|
|
@@ -14,19 +14,19 @@ Many companies, projects and products have integrated noVNC including
|
|
|
14
14
|
[OpenNebula](http://opennebula.org/),
|
|
15
15
|
[LibVNCServer](http://libvncserver.sourceforge.net), and
|
|
16
16
|
[ThinLinc](https://cendio.com/thinlinc). See
|
|
17
|
-
[the Projects and
|
|
17
|
+
[the Projects and companies wiki page](https://github.com/novnc/noVNC/wiki/Projects-and-companies-using-noVNC)
|
|
18
18
|
for a more complete list with additional info and links.
|
|
19
19
|
|
|
20
|
-
### Table of
|
|
20
|
+
### Table of contents
|
|
21
21
|
|
|
22
22
|
- [News/help/contact](#newshelpcontact)
|
|
23
23
|
- [Features](#features)
|
|
24
24
|
- [Screenshots](#screenshots)
|
|
25
|
-
- [Browser
|
|
26
|
-
- [Server
|
|
27
|
-
- [Quick
|
|
28
|
-
- [Installation from
|
|
29
|
-
- [Integration and
|
|
25
|
+
- [Browser requirements](#browser-requirements)
|
|
26
|
+
- [Server requirements](#server-requirements)
|
|
27
|
+
- [Quick start](#quick-start)
|
|
28
|
+
- [Installation from snap package](#installation-from-snap-package)
|
|
29
|
+
- [Integration and deployment](#integration-and-deployment)
|
|
30
30
|
- [Authors/Contributors](#authorscontributors)
|
|
31
31
|
|
|
32
32
|
### News/help/contact
|
|
@@ -68,6 +68,7 @@ profits such as:
|
|
|
68
68
|
* Supported VNC encodings: raw, copyrect, rre, hextile, tight, tightPNG,
|
|
69
69
|
ZRLE, JPEG, Zlib
|
|
70
70
|
* Supports scaling, clipping and resizing the desktop
|
|
71
|
+
* Supports back & forward mouse buttons
|
|
71
72
|
* Local cursor rendering
|
|
72
73
|
* Clipboard copy/paste with full Unicode support
|
|
73
74
|
* Translations
|
|
@@ -86,16 +87,16 @@ See more screenshots
|
|
|
86
87
|
[here](http://novnc.com/screenshots.html).
|
|
87
88
|
|
|
88
89
|
|
|
89
|
-
### Browser
|
|
90
|
+
### Browser requirements
|
|
90
91
|
|
|
91
92
|
noVNC uses many modern web technologies so a formal requirement list is
|
|
92
93
|
not available. However these are the minimum versions we are currently
|
|
93
94
|
aware of:
|
|
94
95
|
|
|
95
|
-
* Chrome
|
|
96
|
+
* Chrome 89, Firefox 89, Safari 15, Opera 75, Edge 89
|
|
96
97
|
|
|
97
98
|
|
|
98
|
-
### Server
|
|
99
|
+
### Server requirements
|
|
99
100
|
|
|
100
101
|
noVNC follows the standard VNC protocol, but unlike other VNC clients it does
|
|
101
102
|
require WebSockets support. Many servers include support (e.g.
|
|
@@ -107,7 +108,7 @@ use a WebSockets to TCP socket proxy. noVNC has a sister project
|
|
|
107
108
|
proxy.
|
|
108
109
|
|
|
109
110
|
|
|
110
|
-
### Quick
|
|
111
|
+
### Quick start
|
|
111
112
|
|
|
112
113
|
* Use the `novnc_proxy` script to automatically download and start websockify, which
|
|
113
114
|
includes a mini-webserver and the WebSockets proxy. The `--vnc` option is
|
|
@@ -124,23 +125,23 @@ proxy.
|
|
|
124
125
|
script. Hit the Connect button, enter a password if the VNC server has one
|
|
125
126
|
configured, and enjoy!
|
|
126
127
|
|
|
127
|
-
### Installation from
|
|
128
|
-
Running the command below will install the latest release of noVNC from
|
|
128
|
+
### Installation from snap package
|
|
129
|
+
Running the command below will install the latest release of noVNC from snap:
|
|
129
130
|
|
|
130
131
|
`sudo snap install novnc`
|
|
131
132
|
|
|
132
|
-
#### Running noVNC from
|
|
133
|
+
#### Running noVNC from snap directly
|
|
133
134
|
|
|
134
|
-
You can run the
|
|
135
|
+
You can run the snap package installed novnc directly with, for example:
|
|
135
136
|
|
|
136
137
|
`novnc --listen 6081 --vnc localhost:5901 # /snap/bin/novnc if /snap/bin is not in your PATH`
|
|
137
138
|
|
|
138
|
-
If you want to use certificate files, due to standard
|
|
139
|
+
If you want to use certificate files, due to standard snap confinement restrictions you need to have them in the /home/\<user\>/snap/novnc/current/ directory. If your username is jsmith an example command would be:
|
|
139
140
|
|
|
140
141
|
`novnc --listen 8443 --cert ~jsmith/snap/novnc/current/self.crt --key ~jsmith/snap/novnc/current/self.key --vnc ubuntu.example.com:5901`
|
|
141
142
|
|
|
142
|
-
#### Running noVNC from
|
|
143
|
-
The
|
|
143
|
+
#### Running noVNC from snap as a service (daemon)
|
|
144
|
+
The snap package also has the capability to run a 'novnc' service which can be
|
|
144
145
|
configured to listen on multiple ports connecting to multiple VNC servers
|
|
145
146
|
(effectively a service runing multiple instances of novnc).
|
|
146
147
|
Instructions (with example values):
|
|
@@ -172,7 +173,7 @@ services.n6082.listen 6082
|
|
|
172
173
|
services.n6082.vnc localhost:5902
|
|
173
174
|
```
|
|
174
175
|
|
|
175
|
-
Disable a service (note that because of a limitation in
|
|
176
|
+
Disable a service (note that because of a limitation in snap it's currently not
|
|
176
177
|
possible to unset config variables, setting them to blank values is the way
|
|
177
178
|
to disable a service):
|
|
178
179
|
|
|
@@ -189,7 +190,7 @@ services.n6082.listen
|
|
|
189
190
|
services.n6082.vnc
|
|
190
191
|
```
|
|
191
192
|
|
|
192
|
-
### Integration and
|
|
193
|
+
### Integration and deployment
|
|
193
194
|
|
|
194
195
|
Please see our other documents for how to integrate noVNC in your own software,
|
|
195
196
|
or deploying the noVNC application in production environments:
|
|
@@ -212,8 +213,8 @@ that list and you think you should be, feel free to send a PR to fix that.
|
|
|
212
213
|
* [Solly Ross](https://github.com/DirectXMan12) (Red Hat / OpenStack)
|
|
213
214
|
|
|
214
215
|
* Notable contributions:
|
|
215
|
-
* UI and
|
|
216
|
-
* Original
|
|
216
|
+
* UI and icons : Pierre Ossman, Chris Gordon
|
|
217
|
+
* Original logo : Michael Sersen
|
|
217
218
|
* tight encoding : Michael Tinglof (Mercuri.ca)
|
|
218
219
|
* RealVNC RSA AES authentication : USTC Vlab Team
|
|
219
220
|
|
package/docs/LIBRARY.md
CHANGED
|
@@ -16,7 +16,7 @@ noVNC includes a small example application called `vnc_lite.html`. This does
|
|
|
16
16
|
not make use of all the features of noVNC, but is a good start to see how to
|
|
17
17
|
do things.
|
|
18
18
|
|
|
19
|
-
## Conversion of
|
|
19
|
+
## Conversion of modules
|
|
20
20
|
|
|
21
21
|
noVNC is written using ECMAScript 6 modules. This is not supported by older
|
|
22
22
|
versions of Node.js. To use noVNC with those older versions of Node.js the
|
package/lib/crypto/md5.js
CHANGED
|
@@ -10,7 +10,7 @@ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.
|
|
|
10
10
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
11
11
|
/*
|
|
12
12
|
* noVNC: HTML5 VNC client
|
|
13
|
-
* Copyright (C) 2021 The noVNC
|
|
13
|
+
* Copyright (C) 2021 The noVNC authors
|
|
14
14
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
15
15
|
*
|
|
16
16
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/copyrect.js
CHANGED
|
@@ -12,7 +12,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
/*
|
|
14
14
|
* noVNC: HTML5 VNC client
|
|
15
|
-
* Copyright (C) 2019 The noVNC
|
|
15
|
+
* Copyright (C) 2019 The noVNC authors
|
|
16
16
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
17
17
|
*
|
|
18
18
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/h264.js
CHANGED
|
@@ -20,7 +20,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
20
20
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
21
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
22
22
|
* noVNC: HTML5 VNC client
|
|
23
|
-
* Copyright (C) 2024 The noVNC
|
|
23
|
+
* Copyright (C) 2024 The noVNC authors
|
|
24
24
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
25
25
|
*
|
|
26
26
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/hextile.js
CHANGED
|
@@ -14,7 +14,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
16
16
|
* noVNC: HTML5 VNC client
|
|
17
|
-
* Copyright (C) 2019 The noVNC
|
|
17
|
+
* Copyright (C) 2019 The noVNC authors
|
|
18
18
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
19
19
|
*
|
|
20
20
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/jpeg.js
CHANGED
|
@@ -19,7 +19,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
19
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
20
|
/*
|
|
21
21
|
* noVNC: HTML5 VNC client
|
|
22
|
-
* Copyright (C) 2019 The noVNC
|
|
22
|
+
* Copyright (C) 2019 The noVNC authors
|
|
23
23
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
24
24
|
*
|
|
25
25
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/raw.js
CHANGED
|
@@ -12,7 +12,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
/*
|
|
14
14
|
* noVNC: HTML5 VNC client
|
|
15
|
-
* Copyright (C) 2019 The noVNC
|
|
15
|
+
* Copyright (C) 2019 The noVNC authors
|
|
16
16
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
17
17
|
*
|
|
18
18
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/rre.js
CHANGED
|
@@ -12,7 +12,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
/*
|
|
14
14
|
* noVNC: HTML5 VNC client
|
|
15
|
-
* Copyright (C) 2019 The noVNC
|
|
15
|
+
* Copyright (C) 2019 The noVNC authors
|
|
16
16
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
17
17
|
*
|
|
18
18
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/tight.js
CHANGED
|
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
18
18
|
* noVNC: HTML5 VNC client
|
|
19
|
-
* Copyright (C) 2019 The noVNC
|
|
19
|
+
* Copyright (C) 2019 The noVNC authors
|
|
20
20
|
* (c) 2012 Michael Tinglof, Joe Balaz, Les Piech (Mercuri.ca)
|
|
21
21
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
22
22
|
*
|
package/lib/decoders/tightpng.js
CHANGED
|
@@ -20,7 +20,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
20
20
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
21
21
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /*
|
|
22
22
|
* noVNC: HTML5 VNC client
|
|
23
|
-
* Copyright (C) 2019 The noVNC
|
|
23
|
+
* Copyright (C) 2019 The noVNC authors
|
|
24
24
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
25
25
|
*
|
|
26
26
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/zlib.js
CHANGED
|
@@ -13,7 +13,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
15
15
|
* noVNC: HTML5 VNC client
|
|
16
|
-
* Copyright (C) 2024 The noVNC
|
|
16
|
+
* Copyright (C) 2024 The noVNC authors
|
|
17
17
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
18
18
|
*
|
|
19
19
|
* See README.md for usage and integration instructions.
|
package/lib/decoders/zrle.js
CHANGED
|
@@ -13,7 +13,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
15
15
|
* noVNC: HTML5 VNC client
|
|
16
|
-
* Copyright (C) 2021 The noVNC
|
|
16
|
+
* Copyright (C) 2021 The noVNC authors
|
|
17
17
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
18
18
|
*
|
|
19
19
|
* See README.md for usage and integration instructions.
|
package/lib/deflator.js
CHANGED
|
@@ -14,7 +14,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
16
16
|
* noVNC: HTML5 VNC client
|
|
17
|
-
* Copyright (C) 2020 The noVNC
|
|
17
|
+
* Copyright (C) 2020 The noVNC authors
|
|
18
18
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
19
19
|
*
|
|
20
20
|
* See README.md for usage and integration instructions.
|
package/lib/display.js
CHANGED
|
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
17
17
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
18
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
19
19
|
* noVNC: HTML5 VNC client
|
|
20
|
-
* Copyright (C) 2019 The noVNC
|
|
20
|
+
* Copyright (C) 2019 The noVNC authors
|
|
21
21
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
22
22
|
*
|
|
23
23
|
* See README.md for usage and integration instructions.
|
package/lib/encodings.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.encodingName = encodingName;
|
|
|
7
7
|
exports.encodings = void 0;
|
|
8
8
|
/*
|
|
9
9
|
* noVNC: HTML5 VNC client
|
|
10
|
-
* Copyright (C) 2019 The noVNC
|
|
10
|
+
* Copyright (C) 2019 The noVNC authors
|
|
11
11
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
12
12
|
*
|
|
13
13
|
* See README.md for usage and integration instructions.
|
|
@@ -36,6 +36,7 @@ var encodings = exports.encodings = {
|
|
|
36
36
|
pseudoEncodingXvp: -309,
|
|
37
37
|
pseudoEncodingFence: -312,
|
|
38
38
|
pseudoEncodingContinuousUpdates: -313,
|
|
39
|
+
pseudoEncodingExtendedMouseButtons: -316,
|
|
39
40
|
pseudoEncodingCompressLevel9: -247,
|
|
40
41
|
pseudoEncodingCompressLevel0: -256,
|
|
41
42
|
pseudoEncodingVMwareCursor: 0x574d5664,
|
package/lib/inflator.js
CHANGED
|
@@ -14,7 +14,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
16
16
|
* noVNC: HTML5 VNC client
|
|
17
|
-
* Copyright (C) 2020 The noVNC
|
|
17
|
+
* Copyright (C) 2020 The noVNC authors
|
|
18
18
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
19
19
|
*
|
|
20
20
|
* See README.md for usage and integration instructions.
|
package/lib/input/domkeytable.js
CHANGED
|
@@ -8,7 +8,7 @@ var _keysym = _interopRequireDefault(require("./keysym.js"));
|
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
/*
|
|
10
10
|
* noVNC: HTML5 VNC client
|
|
11
|
-
* Copyright (C) 2018 The noVNC
|
|
11
|
+
* Copyright (C) 2018 The noVNC authors
|
|
12
12
|
* Licensed under MPL 2.0 or any later version (see LICENSE.txt)
|
|
13
13
|
*/
|
|
14
14
|
|
package/lib/input/fixedkeys.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
/*
|
|
8
8
|
* noVNC: HTML5 VNC client
|
|
9
|
-
* Copyright (C) 2018 The noVNC
|
|
9
|
+
* Copyright (C) 2018 The noVNC authors
|
|
10
10
|
* Licensed under MPL 2.0 or any later version (see LICENSE.txt)
|
|
11
11
|
*/
|
|
12
12
|
/*
|
|
@@ -12,7 +12,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
/*
|
|
14
14
|
* noVNC: HTML5 VNC client
|
|
15
|
-
* Copyright (C) 2020 The noVNC
|
|
15
|
+
* Copyright (C) 2020 The noVNC authors
|
|
16
16
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
17
17
|
*
|
|
18
18
|
* See README.md for usage and integration instructions.
|
package/lib/input/keyboard.js
CHANGED
|
@@ -19,7 +19,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
19
19
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
21
21
|
* noVNC: HTML5 VNC client
|
|
22
|
-
* Copyright (C) 2019 The noVNC
|
|
22
|
+
* Copyright (C) 2019 The noVNC authors
|
|
23
23
|
* Licensed under MPL 2.0 or any later version (see LICENSE.txt)
|
|
24
24
|
*/
|
|
25
25
|
//
|
package/lib/input/vkeys.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
/*
|
|
8
8
|
* noVNC: HTML5 VNC client
|
|
9
|
-
* Copyright (C) 2018 The noVNC
|
|
9
|
+
* Copyright (C) 2018 The noVNC authors
|
|
10
10
|
* Licensed under MPL 2.0 or any later version (see LICENSE.txt)
|
|
11
11
|
*/
|
|
12
12
|
/*
|
package/lib/rfb.js
CHANGED
|
@@ -60,7 +60,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
60
60
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
61
61
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } /*
|
|
62
62
|
* noVNC: HTML5 VNC client
|
|
63
|
-
* Copyright (C) 2020 The noVNC
|
|
63
|
+
* Copyright (C) 2020 The noVNC authors
|
|
64
64
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
65
65
|
*
|
|
66
66
|
* See README.md for usage and integration instructions.
|
|
@@ -172,6 +172,7 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
172
172
|
_this._screenID = 0;
|
|
173
173
|
_this._screenFlags = 0;
|
|
174
174
|
_this._qemuExtKeyEventSupported = false;
|
|
175
|
+
_this._extendedPointerEventSupported = false;
|
|
175
176
|
_this._clipboardText = null;
|
|
176
177
|
_this._clipboardServerCapabilitiesActions = {};
|
|
177
178
|
_this._clipboardServerCapabilitiesFormats = {};
|
|
@@ -790,6 +791,8 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
790
791
|
currentHeight = _this$_currentClientS2[1];
|
|
791
792
|
return currentWidth == this._expectedClientWidth && currentHeight == this._expectedClientHeight;
|
|
792
793
|
}
|
|
794
|
+
|
|
795
|
+
// Handle browser window resizes
|
|
793
796
|
}, {
|
|
794
797
|
key: "_handleResize",
|
|
795
798
|
value: function _handleResize() {
|
|
@@ -803,6 +806,7 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
803
806
|
window.requestAnimationFrame(function () {
|
|
804
807
|
_this2._updateClip();
|
|
805
808
|
_this2._updateScale();
|
|
809
|
+
_this2._saveExpectedClientSize();
|
|
806
810
|
});
|
|
807
811
|
if (this._resizeSession) {
|
|
808
812
|
// Request changing the resolution of the remote display to
|
|
@@ -1124,81 +1128,78 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1124
1128
|
return;
|
|
1125
1129
|
}
|
|
1126
1130
|
var pos = (0, _element.clientToElement)(ev.clientX, ev.clientY, this._canvas);
|
|
1131
|
+
var bmask = RFB._convertButtonMask(ev.buttons);
|
|
1132
|
+
var down = ev.type == 'mousedown';
|
|
1127
1133
|
switch (ev.type) {
|
|
1128
1134
|
case 'mousedown':
|
|
1129
|
-
(0, _events.setCapture)(this._canvas);
|
|
1130
|
-
this._handleMouseButton(pos.x, pos.y, true, 1 << ev.button);
|
|
1131
|
-
break;
|
|
1132
1135
|
case 'mouseup':
|
|
1133
|
-
this.
|
|
1136
|
+
if (this.dragViewport) {
|
|
1137
|
+
if (down && !this._viewportDragging) {
|
|
1138
|
+
this._viewportDragging = true;
|
|
1139
|
+
this._viewportDragPos = {
|
|
1140
|
+
'x': pos.x,
|
|
1141
|
+
'y': pos.y
|
|
1142
|
+
};
|
|
1143
|
+
this._viewportHasMoved = false;
|
|
1144
|
+
this._flushMouseMoveTimer(pos.x, pos.y);
|
|
1145
|
+
|
|
1146
|
+
// Skip sending mouse events, instead save the current
|
|
1147
|
+
// mouse mask so we can send it later.
|
|
1148
|
+
this._mouseButtonMask = bmask;
|
|
1149
|
+
break;
|
|
1150
|
+
} else {
|
|
1151
|
+
this._viewportDragging = false;
|
|
1152
|
+
|
|
1153
|
+
// If we actually performed a drag then we are done
|
|
1154
|
+
// here and should not send any mouse events
|
|
1155
|
+
if (this._viewportHasMoved) {
|
|
1156
|
+
this._mouseButtonMask = bmask;
|
|
1157
|
+
break;
|
|
1158
|
+
}
|
|
1159
|
+
// Otherwise we treat this as a mouse click event.
|
|
1160
|
+
// Send the previously saved button mask, followed
|
|
1161
|
+
// by the current button mask at the end of this
|
|
1162
|
+
// function.
|
|
1163
|
+
this._sendMouse(pos.x, pos.y, this._mouseButtonMask);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
if (down) {
|
|
1167
|
+
(0, _events.setCapture)(this._canvas);
|
|
1168
|
+
}
|
|
1169
|
+
this._handleMouseButton(pos.x, pos.y, bmask);
|
|
1134
1170
|
break;
|
|
1135
1171
|
case 'mousemove':
|
|
1172
|
+
if (this._viewportDragging) {
|
|
1173
|
+
var deltaX = this._viewportDragPos.x - pos.x;
|
|
1174
|
+
var deltaY = this._viewportDragPos.y - pos.y;
|
|
1175
|
+
if (this._viewportHasMoved || Math.abs(deltaX) > _browser.dragThreshold || Math.abs(deltaY) > _browser.dragThreshold) {
|
|
1176
|
+
this._viewportHasMoved = true;
|
|
1177
|
+
this._viewportDragPos = {
|
|
1178
|
+
'x': pos.x,
|
|
1179
|
+
'y': pos.y
|
|
1180
|
+
};
|
|
1181
|
+
this._display.viewportChangePos(deltaX, deltaY);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
// Skip sending mouse events
|
|
1185
|
+
break;
|
|
1186
|
+
}
|
|
1136
1187
|
this._handleMouseMove(pos.x, pos.y);
|
|
1137
1188
|
break;
|
|
1138
1189
|
}
|
|
1139
1190
|
}
|
|
1140
1191
|
}, {
|
|
1141
1192
|
key: "_handleMouseButton",
|
|
1142
|
-
value: function _handleMouseButton(x, y,
|
|
1143
|
-
if (this.dragViewport) {
|
|
1144
|
-
if (down && !this._viewportDragging) {
|
|
1145
|
-
this._viewportDragging = true;
|
|
1146
|
-
this._viewportDragPos = {
|
|
1147
|
-
'x': x,
|
|
1148
|
-
'y': y
|
|
1149
|
-
};
|
|
1150
|
-
this._viewportHasMoved = false;
|
|
1151
|
-
|
|
1152
|
-
// Skip sending mouse events
|
|
1153
|
-
return;
|
|
1154
|
-
} else {
|
|
1155
|
-
this._viewportDragging = false;
|
|
1156
|
-
|
|
1157
|
-
// If we actually performed a drag then we are done
|
|
1158
|
-
// here and should not send any mouse events
|
|
1159
|
-
if (this._viewportHasMoved) {
|
|
1160
|
-
return;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
// Otherwise we treat this as a mouse click event.
|
|
1164
|
-
// Send the button down event here, as the button up
|
|
1165
|
-
// event is sent at the end of this function.
|
|
1166
|
-
this._sendMouse(x, y, bmask);
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1193
|
+
value: function _handleMouseButton(x, y, bmask) {
|
|
1170
1194
|
// Flush waiting move event first
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
this._mouseMoveTimer = null;
|
|
1174
|
-
this._sendMouse(x, y, this._mouseButtonMask);
|
|
1175
|
-
}
|
|
1176
|
-
if (down) {
|
|
1177
|
-
this._mouseButtonMask |= bmask;
|
|
1178
|
-
} else {
|
|
1179
|
-
this._mouseButtonMask &= ~bmask;
|
|
1180
|
-
}
|
|
1195
|
+
this._flushMouseMoveTimer(x, y);
|
|
1196
|
+
this._mouseButtonMask = bmask;
|
|
1181
1197
|
this._sendMouse(x, y, this._mouseButtonMask);
|
|
1182
1198
|
}
|
|
1183
1199
|
}, {
|
|
1184
1200
|
key: "_handleMouseMove",
|
|
1185
1201
|
value: function _handleMouseMove(x, y) {
|
|
1186
1202
|
var _this4 = this;
|
|
1187
|
-
if (this._viewportDragging) {
|
|
1188
|
-
var deltaX = this._viewportDragPos.x - x;
|
|
1189
|
-
var deltaY = this._viewportDragPos.y - y;
|
|
1190
|
-
if (this._viewportHasMoved || Math.abs(deltaX) > _browser.dragThreshold || Math.abs(deltaY) > _browser.dragThreshold) {
|
|
1191
|
-
this._viewportHasMoved = true;
|
|
1192
|
-
this._viewportDragPos = {
|
|
1193
|
-
'x': x,
|
|
1194
|
-
'y': y
|
|
1195
|
-
};
|
|
1196
|
-
this._display.viewportChangePos(deltaX, deltaY);
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
// Skip sending mouse events
|
|
1200
|
-
return;
|
|
1201
|
-
}
|
|
1202
1203
|
this._mousePos = {
|
|
1203
1204
|
'x': x,
|
|
1204
1205
|
'y': y
|
|
@@ -1235,7 +1236,16 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1235
1236
|
return;
|
|
1236
1237
|
} // View only, skip mouse events
|
|
1237
1238
|
|
|
1238
|
-
|
|
1239
|
+
// Highest bit in mask is never sent to the server
|
|
1240
|
+
if (mask & 0x8000) {
|
|
1241
|
+
throw new Error("Illegal mouse button mask (mask: " + mask + ")");
|
|
1242
|
+
}
|
|
1243
|
+
var extendedMouseButtons = mask & 0x7f80;
|
|
1244
|
+
if (this._extendedPointerEventSupported && extendedMouseButtons) {
|
|
1245
|
+
RFB.messages.extendedPointerEvent(this._sock, this._display.absX(x), this._display.absY(y), mask);
|
|
1246
|
+
} else {
|
|
1247
|
+
RFB.messages.pointerEvent(this._sock, this._display.absX(x), this._display.absY(y), mask);
|
|
1248
|
+
}
|
|
1239
1249
|
}
|
|
1240
1250
|
}, {
|
|
1241
1251
|
key: "_handleWheel",
|
|
@@ -1250,6 +1260,7 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1250
1260
|
ev.stopPropagation();
|
|
1251
1261
|
ev.preventDefault();
|
|
1252
1262
|
var pos = (0, _element.clientToElement)(ev.clientX, ev.clientY, this._canvas);
|
|
1263
|
+
var bmask = RFB._convertButtonMask(ev.buttons);
|
|
1253
1264
|
var dX = ev.deltaX;
|
|
1254
1265
|
var dY = ev.deltaY;
|
|
1255
1266
|
|
|
@@ -1273,21 +1284,21 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1273
1284
|
// for one of the axes is large enough.
|
|
1274
1285
|
if (Math.abs(this._accumulatedWheelDeltaX) >= WHEEL_STEP) {
|
|
1275
1286
|
if (this._accumulatedWheelDeltaX < 0) {
|
|
1276
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1277
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1287
|
+
this._handleMouseButton(pos.x, pos.y, bmask | 1 << 5);
|
|
1288
|
+
this._handleMouseButton(pos.x, pos.y, bmask);
|
|
1278
1289
|
} else if (this._accumulatedWheelDeltaX > 0) {
|
|
1279
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1280
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1290
|
+
this._handleMouseButton(pos.x, pos.y, bmask | 1 << 6);
|
|
1291
|
+
this._handleMouseButton(pos.x, pos.y, bmask);
|
|
1281
1292
|
}
|
|
1282
1293
|
this._accumulatedWheelDeltaX = 0;
|
|
1283
1294
|
}
|
|
1284
1295
|
if (Math.abs(this._accumulatedWheelDeltaY) >= WHEEL_STEP) {
|
|
1285
1296
|
if (this._accumulatedWheelDeltaY < 0) {
|
|
1286
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1287
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1297
|
+
this._handleMouseButton(pos.x, pos.y, bmask | 1 << 3);
|
|
1298
|
+
this._handleMouseButton(pos.x, pos.y, bmask);
|
|
1288
1299
|
} else if (this._accumulatedWheelDeltaY > 0) {
|
|
1289
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1290
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1300
|
+
this._handleMouseButton(pos.x, pos.y, bmask | 1 << 4);
|
|
1301
|
+
this._handleMouseButton(pos.x, pos.y, bmask);
|
|
1291
1302
|
}
|
|
1292
1303
|
this._accumulatedWheelDeltaY = 0;
|
|
1293
1304
|
}
|
|
@@ -1320,8 +1331,8 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1320
1331
|
}
|
|
1321
1332
|
this._gestureLastTapTime = Date.now();
|
|
1322
1333
|
this._fakeMouseMove(this._gestureFirstDoubleTapEv, pos.x, pos.y);
|
|
1323
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1324
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1334
|
+
this._handleMouseButton(pos.x, pos.y, bmask);
|
|
1335
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1325
1336
|
}
|
|
1326
1337
|
}, {
|
|
1327
1338
|
key: "_handleGesture",
|
|
@@ -1341,12 +1352,32 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1341
1352
|
this._handleTapEvent(ev, 0x2);
|
|
1342
1353
|
break;
|
|
1343
1354
|
case 'drag':
|
|
1344
|
-
this.
|
|
1345
|
-
|
|
1355
|
+
if (this.dragViewport) {
|
|
1356
|
+
this._viewportHasMoved = false;
|
|
1357
|
+
this._viewportDragging = true;
|
|
1358
|
+
this._viewportDragPos = {
|
|
1359
|
+
'x': pos.x,
|
|
1360
|
+
'y': pos.y
|
|
1361
|
+
};
|
|
1362
|
+
} else {
|
|
1363
|
+
this._fakeMouseMove(ev, pos.x, pos.y);
|
|
1364
|
+
this._handleMouseButton(pos.x, pos.y, 0x1);
|
|
1365
|
+
}
|
|
1346
1366
|
break;
|
|
1347
1367
|
case 'longpress':
|
|
1348
|
-
this.
|
|
1349
|
-
|
|
1368
|
+
if (this.dragViewport) {
|
|
1369
|
+
// If dragViewport is true, we need to wait to see
|
|
1370
|
+
// if we have dragged outside the threshold before
|
|
1371
|
+
// sending any events to the server.
|
|
1372
|
+
this._viewportHasMoved = false;
|
|
1373
|
+
this._viewportDragPos = {
|
|
1374
|
+
'x': pos.x,
|
|
1375
|
+
'y': pos.y
|
|
1376
|
+
};
|
|
1377
|
+
} else {
|
|
1378
|
+
this._fakeMouseMove(ev, pos.x, pos.y);
|
|
1379
|
+
this._handleMouseButton(pos.x, pos.y, 0x4);
|
|
1380
|
+
}
|
|
1350
1381
|
break;
|
|
1351
1382
|
case 'twodrag':
|
|
1352
1383
|
this._gestureLastMagnitudeX = ev.detail.magnitudeX;
|
|
@@ -1367,7 +1398,21 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1367
1398
|
break;
|
|
1368
1399
|
case 'drag':
|
|
1369
1400
|
case 'longpress':
|
|
1370
|
-
this.
|
|
1401
|
+
if (this.dragViewport) {
|
|
1402
|
+
this._viewportDragging = true;
|
|
1403
|
+
var deltaX = this._viewportDragPos.x - pos.x;
|
|
1404
|
+
var deltaY = this._viewportDragPos.y - pos.y;
|
|
1405
|
+
if (this._viewportHasMoved || Math.abs(deltaX) > _browser.dragThreshold || Math.abs(deltaY) > _browser.dragThreshold) {
|
|
1406
|
+
this._viewportHasMoved = true;
|
|
1407
|
+
this._viewportDragPos = {
|
|
1408
|
+
'x': pos.x,
|
|
1409
|
+
'y': pos.y
|
|
1410
|
+
};
|
|
1411
|
+
this._display.viewportChangePos(deltaX, deltaY);
|
|
1412
|
+
}
|
|
1413
|
+
} else {
|
|
1414
|
+
this._fakeMouseMove(ev, pos.x, pos.y);
|
|
1415
|
+
}
|
|
1371
1416
|
break;
|
|
1372
1417
|
case 'twodrag':
|
|
1373
1418
|
// Always scroll in the same position.
|
|
@@ -1375,23 +1420,23 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1375
1420
|
// every update.
|
|
1376
1421
|
this._fakeMouseMove(ev, pos.x, pos.y);
|
|
1377
1422
|
while (ev.detail.magnitudeY - this._gestureLastMagnitudeY > GESTURE_SCRLSENS) {
|
|
1378
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1379
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1423
|
+
this._handleMouseButton(pos.x, pos.y, 0x8);
|
|
1424
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1380
1425
|
this._gestureLastMagnitudeY += GESTURE_SCRLSENS;
|
|
1381
1426
|
}
|
|
1382
1427
|
while (ev.detail.magnitudeY - this._gestureLastMagnitudeY < -GESTURE_SCRLSENS) {
|
|
1383
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1384
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1428
|
+
this._handleMouseButton(pos.x, pos.y, 0x10);
|
|
1429
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1385
1430
|
this._gestureLastMagnitudeY -= GESTURE_SCRLSENS;
|
|
1386
1431
|
}
|
|
1387
1432
|
while (ev.detail.magnitudeX - this._gestureLastMagnitudeX > GESTURE_SCRLSENS) {
|
|
1388
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1389
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1433
|
+
this._handleMouseButton(pos.x, pos.y, 0x20);
|
|
1434
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1390
1435
|
this._gestureLastMagnitudeX += GESTURE_SCRLSENS;
|
|
1391
1436
|
}
|
|
1392
1437
|
while (ev.detail.magnitudeX - this._gestureLastMagnitudeX < -GESTURE_SCRLSENS) {
|
|
1393
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1394
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1438
|
+
this._handleMouseButton(pos.x, pos.y, 0x40);
|
|
1439
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1395
1440
|
this._gestureLastMagnitudeX -= GESTURE_SCRLSENS;
|
|
1396
1441
|
}
|
|
1397
1442
|
break;
|
|
@@ -1404,13 +1449,13 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1404
1449
|
if (Math.abs(magnitude - this._gestureLastMagnitudeX) > GESTURE_ZOOMSENS) {
|
|
1405
1450
|
this._handleKeyEvent(_keysym["default"].XK_Control_L, "ControlLeft", true);
|
|
1406
1451
|
while (magnitude - this._gestureLastMagnitudeX > GESTURE_ZOOMSENS) {
|
|
1407
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1408
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1452
|
+
this._handleMouseButton(pos.x, pos.y, 0x8);
|
|
1453
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1409
1454
|
this._gestureLastMagnitudeX += GESTURE_ZOOMSENS;
|
|
1410
1455
|
}
|
|
1411
1456
|
while (magnitude - this._gestureLastMagnitudeX < -GESTURE_ZOOMSENS) {
|
|
1412
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1413
|
-
this._handleMouseButton(pos.x, pos.y,
|
|
1457
|
+
this._handleMouseButton(pos.x, pos.y, 0x10);
|
|
1458
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1414
1459
|
this._gestureLastMagnitudeX -= GESTURE_ZOOMSENS;
|
|
1415
1460
|
}
|
|
1416
1461
|
}
|
|
@@ -1427,19 +1472,47 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
1427
1472
|
case 'twodrag':
|
|
1428
1473
|
break;
|
|
1429
1474
|
case 'drag':
|
|
1430
|
-
this.
|
|
1431
|
-
|
|
1475
|
+
if (this.dragViewport) {
|
|
1476
|
+
this._viewportDragging = false;
|
|
1477
|
+
} else {
|
|
1478
|
+
this._fakeMouseMove(ev, pos.x, pos.y);
|
|
1479
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1480
|
+
}
|
|
1432
1481
|
break;
|
|
1433
1482
|
case 'longpress':
|
|
1434
|
-
this.
|
|
1435
|
-
|
|
1483
|
+
if (this._viewportHasMoved) {
|
|
1484
|
+
// We don't want to send any events if we have moved
|
|
1485
|
+
// our viewport
|
|
1486
|
+
break;
|
|
1487
|
+
}
|
|
1488
|
+
if (this.dragViewport && !this._viewportHasMoved) {
|
|
1489
|
+
this._fakeMouseMove(ev, pos.x, pos.y);
|
|
1490
|
+
// If dragViewport is true, we need to wait to see
|
|
1491
|
+
// if we have dragged outside the threshold before
|
|
1492
|
+
// sending any events to the server.
|
|
1493
|
+
this._handleMouseButton(pos.x, pos.y, 0x4);
|
|
1494
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1495
|
+
this._viewportDragging = false;
|
|
1496
|
+
} else {
|
|
1497
|
+
this._fakeMouseMove(ev, pos.x, pos.y);
|
|
1498
|
+
this._handleMouseButton(pos.x, pos.y, 0x0);
|
|
1499
|
+
}
|
|
1436
1500
|
break;
|
|
1437
1501
|
}
|
|
1438
1502
|
break;
|
|
1439
1503
|
}
|
|
1440
1504
|
}
|
|
1505
|
+
}, {
|
|
1506
|
+
key: "_flushMouseMoveTimer",
|
|
1507
|
+
value: function _flushMouseMoveTimer(x, y) {
|
|
1508
|
+
if (this._mouseMoveTimer !== null) {
|
|
1509
|
+
clearTimeout(this._mouseMoveTimer);
|
|
1510
|
+
this._mouseMoveTimer = null;
|
|
1511
|
+
this._sendMouse(x, y, this._mouseButtonMask);
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1441
1514
|
|
|
1442
|
-
// Message
|
|
1515
|
+
// Message handlers
|
|
1443
1516
|
}, {
|
|
1444
1517
|
key: "_negotiateProtocolVersion",
|
|
1445
1518
|
value: function _negotiateProtocolVersion() {
|
|
@@ -2237,6 +2310,7 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
2237
2310
|
encs.push(_encodings.encodings.pseudoEncodingContinuousUpdates);
|
|
2238
2311
|
encs.push(_encodings.encodings.pseudoEncodingDesktopName);
|
|
2239
2312
|
encs.push(_encodings.encodings.pseudoEncodingExtendedClipboard);
|
|
2313
|
+
encs.push(_encodings.encodings.pseudoEncodingExtendedMouseButtons);
|
|
2240
2314
|
if (this._fbDepth == 24) {
|
|
2241
2315
|
encs.push(_encodings.encodings.pseudoEncodingVMwareCursor);
|
|
2242
2316
|
encs.push(_encodings.encodings.pseudoEncodingCursor);
|
|
@@ -2493,7 +2567,7 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
2493
2567
|
switch (xvpMsg) {
|
|
2494
2568
|
case 0:
|
|
2495
2569
|
// XVP_FAIL
|
|
2496
|
-
Log.Error("XVP
|
|
2570
|
+
Log.Error("XVP operation failed");
|
|
2497
2571
|
break;
|
|
2498
2572
|
case 1:
|
|
2499
2573
|
// XVP_INIT
|
|
@@ -2634,6 +2708,9 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
2634
2708
|
return true;
|
|
2635
2709
|
case _encodings.encodings.pseudoEncodingExtendedDesktopSize:
|
|
2636
2710
|
return this._handleExtendedDesktopSize();
|
|
2711
|
+
case _encodings.encodings.pseudoEncodingExtendedMouseButtons:
|
|
2712
|
+
this._extendedPointerEventSupported = true;
|
|
2713
|
+
return true;
|
|
2637
2714
|
case _encodings.encodings.pseudoEncodingQEMULedEvent:
|
|
2638
2715
|
return this._handleLedEvent();
|
|
2639
2716
|
default:
|
|
@@ -2786,7 +2863,7 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
2786
2863
|
}, {
|
|
2787
2864
|
key: "_handleLedEvent",
|
|
2788
2865
|
value: function _handleLedEvent() {
|
|
2789
|
-
if (this._sock.rQwait("LED
|
|
2866
|
+
if (this._sock.rQwait("LED status", 1)) {
|
|
2790
2867
|
return false;
|
|
2791
2868
|
}
|
|
2792
2869
|
var data = this._sock.rQshift8();
|
|
@@ -2890,6 +2967,8 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
2890
2967
|
}
|
|
2891
2968
|
RFB.messages.enableContinuousUpdates(this._sock, true, 0, 0, this._fbWidth, this._fbHeight);
|
|
2892
2969
|
}
|
|
2970
|
+
|
|
2971
|
+
// Handle resize-messages from the server
|
|
2893
2972
|
}, {
|
|
2894
2973
|
key: "_resize",
|
|
2895
2974
|
value: function _resize(width, height) {
|
|
@@ -2959,6 +3038,40 @@ var RFB = exports["default"] = /*#__PURE__*/function (_EventTargetMixin) {
|
|
|
2959
3038
|
this._cursor.change(image.rgbaPixels, image.hotx, image.hoty, image.w, image.h);
|
|
2960
3039
|
}
|
|
2961
3040
|
}], [{
|
|
3041
|
+
key: "_convertButtonMask",
|
|
3042
|
+
value: function _convertButtonMask(buttons) {
|
|
3043
|
+
/* The bits in MouseEvent.buttons property correspond
|
|
3044
|
+
* to the following mouse buttons:
|
|
3045
|
+
* 0: Left
|
|
3046
|
+
* 1: Right
|
|
3047
|
+
* 2: Middle
|
|
3048
|
+
* 3: Back
|
|
3049
|
+
* 4: Forward
|
|
3050
|
+
*
|
|
3051
|
+
* These bits needs to be converted to what they are defined as
|
|
3052
|
+
* in the RFB protocol.
|
|
3053
|
+
*/
|
|
3054
|
+
|
|
3055
|
+
var buttonMaskMap = {
|
|
3056
|
+
0: 1 << 0,
|
|
3057
|
+
// Left
|
|
3058
|
+
1: 1 << 2,
|
|
3059
|
+
// Right
|
|
3060
|
+
2: 1 << 1,
|
|
3061
|
+
// Middle
|
|
3062
|
+
3: 1 << 7,
|
|
3063
|
+
// Back
|
|
3064
|
+
4: 1 << 8 // Forward
|
|
3065
|
+
};
|
|
3066
|
+
var bmask = 0;
|
|
3067
|
+
for (var i = 0; i < 5; i++) {
|
|
3068
|
+
if (buttons & 1 << i) {
|
|
3069
|
+
bmask |= buttonMaskMap[i];
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
return bmask;
|
|
3073
|
+
}
|
|
3074
|
+
}, {
|
|
2962
3075
|
key: "genDES",
|
|
2963
3076
|
value: function genDES(password, challenge) {
|
|
2964
3077
|
var passwordChars = password.split('').map(function (c) {
|
|
@@ -3002,11 +3115,33 @@ RFB.messages = {
|
|
|
3002
3115
|
pointerEvent: function pointerEvent(sock, x, y, mask) {
|
|
3003
3116
|
sock.sQpush8(5); // msg-type
|
|
3004
3117
|
|
|
3118
|
+
// Marker bit must be set to 0, otherwise the server might
|
|
3119
|
+
// confuse the marker bit with the highest bit in a normal
|
|
3120
|
+
// PointerEvent message.
|
|
3121
|
+
mask = mask & 0x7f;
|
|
3005
3122
|
sock.sQpush8(mask);
|
|
3006
3123
|
sock.sQpush16(x);
|
|
3007
3124
|
sock.sQpush16(y);
|
|
3008
3125
|
sock.flush();
|
|
3009
3126
|
},
|
|
3127
|
+
extendedPointerEvent: function extendedPointerEvent(sock, x, y, mask) {
|
|
3128
|
+
sock.sQpush8(5); // msg-type
|
|
3129
|
+
|
|
3130
|
+
var higherBits = mask >> 7 & 0xff;
|
|
3131
|
+
|
|
3132
|
+
// Bits 2-7 are reserved
|
|
3133
|
+
if (higherBits & 0xfc) {
|
|
3134
|
+
throw new Error("Invalid mouse button mask: " + mask);
|
|
3135
|
+
}
|
|
3136
|
+
var lowerBits = mask & 0x7f;
|
|
3137
|
+
lowerBits |= 0x80; // Set marker bit to 1
|
|
3138
|
+
|
|
3139
|
+
sock.sQpush8(lowerBits);
|
|
3140
|
+
sock.sQpush16(x);
|
|
3141
|
+
sock.sQpush16(y);
|
|
3142
|
+
sock.sQpush8(higherBits);
|
|
3143
|
+
sock.flush();
|
|
3144
|
+
},
|
|
3010
3145
|
// Used to build Notify and Request data.
|
|
3011
3146
|
_buildExtendedClipboardFlags: function _buildExtendedClipboardFlags(actions, formats) {
|
|
3012
3147
|
var data = new Uint8Array(4);
|
package/lib/util/browser.js
CHANGED
|
@@ -21,6 +21,8 @@ exports.isWebKit = isWebKit;
|
|
|
21
21
|
exports.isWindows = isWindows;
|
|
22
22
|
exports.supportsWebCodecsH264Decode = exports.supportsCursorURIs = void 0;
|
|
23
23
|
var Log = _interopRequireWildcard(require("./logging.js"));
|
|
24
|
+
var _base = _interopRequireDefault(require("../base64.js"));
|
|
25
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
24
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
26
28
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
@@ -28,7 +30,7 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
|
|
|
28
30
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
29
31
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } /*
|
|
30
32
|
* noVNC: HTML5 VNC client
|
|
31
|
-
* Copyright (C) 2019 The noVNC
|
|
33
|
+
* Copyright (C) 2019 The noVNC authors
|
|
32
34
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
33
35
|
*
|
|
34
36
|
* See README.md for usage and integration instructions.
|
|
@@ -92,7 +94,7 @@ function _checkWebCodecsH264DecodeSupport() {
|
|
|
92
94
|
}
|
|
93
95
|
function _checkWebCodecsH264DecodeSupport2() {
|
|
94
96
|
_checkWebCodecsH264DecodeSupport2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
95
|
-
var config,
|
|
97
|
+
var config, support, data, gotframe, _error, decoder, chunk;
|
|
96
98
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
97
99
|
while (1) switch (_context.prev = _context.next) {
|
|
98
100
|
case 0:
|
|
@@ -100,7 +102,7 @@ function _checkWebCodecsH264DecodeSupport2() {
|
|
|
100
102
|
_context.next = 2;
|
|
101
103
|
break;
|
|
102
104
|
}
|
|
103
|
-
return _context.abrupt("return");
|
|
105
|
+
return _context.abrupt("return", false);
|
|
104
106
|
case 2:
|
|
105
107
|
// We'll need to make do with some placeholders here
|
|
106
108
|
config = {
|
|
@@ -112,17 +114,69 @@ function _checkWebCodecsH264DecodeSupport2() {
|
|
|
112
114
|
_context.next = 5;
|
|
113
115
|
return VideoDecoder.isConfigSupported(config);
|
|
114
116
|
case 5:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
support = _context.sent;
|
|
118
|
+
if (support.supported) {
|
|
119
|
+
_context.next = 8;
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
return _context.abrupt("return", false);
|
|
123
|
+
case 8:
|
|
124
|
+
// Firefox incorrectly reports supports for H.264 under some
|
|
125
|
+
// circumstances, so we need to actually test a real frame
|
|
126
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1932392
|
|
127
|
+
data = new Uint8Array(_base["default"].decode('AAAAAWdCwBTZnpuAgICgAAADACAAAAZB4oVNAAAAAWjJYyyAAAABBgX//4Hc' + 'Rem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTY0IHIzMTA4IDMxZTE5Zjkg' + 'LSBILjI2NC9NUEVHLTQgQVZDIGNvZGVjIC0gQ29weWxlZnQgMjAwMy0yMDIz' + 'IC0gaHR0cDovL3d3dy52aWRlb2xhbi5vcmcveDI2NC5odG1sIC0gb3B0aW9u' + 'czogY2FiYWM9MCByZWY9NSBkZWJsb2NrPTE6MDowIGFuYWx5c2U9MHgxOjB4' + 'MTExIG1lPWhleCBzdWJtZT04IHBzeT0xIHBzeV9yZD0xLjAwOjAuMDAgbWl4' + 'ZWRfcmVmPTEgbWVfcmFuZ2U9MTYgY2hyb21hX21lPTEgdHJlbGxpcz0yIDh4' + 'OGRjdD0wIGNxbT0wIGRlYWR6b25lPTIxLDExIGZhc3RfcHNraXA9MSBjaHJv' + 'bWFfcXBfb2Zmc2V0PS0yIHRocmVhZHM9MSBsb29rYWhlYWRfdGhyZWFkcz0x' + 'IHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9' + 'MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVz' + 'PTAgd2VpZ2h0cD0wIGtleWludD1pbmZpbml0ZSBrZXlpbnRfbWluPTI1IHNj' + 'ZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NTAgcmM9' + 'YWJyIG1idHJlZT0xIGJpdHJhdGU9NDAwIHJhdGV0b2w9MS4wIHFjb21wPTAu' + 'NjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFx' + 'PTE6MS4wMACAAAABZYiEBrxmKAAPVccAAS044AA5DRJMnkycJk4TPw=='));
|
|
128
|
+
gotframe = false;
|
|
129
|
+
_error = null;
|
|
130
|
+
decoder = new VideoDecoder({
|
|
131
|
+
output: function output(frame) {
|
|
132
|
+
gotframe = true;
|
|
133
|
+
},
|
|
134
|
+
error: function error(e) {
|
|
135
|
+
_error = e;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
chunk = new EncodedVideoChunk({
|
|
139
|
+
timestamp: 0,
|
|
140
|
+
type: 'key',
|
|
141
|
+
data: data
|
|
142
|
+
});
|
|
143
|
+
decoder.configure(config);
|
|
144
|
+
decoder.decode(chunk);
|
|
145
|
+
_context.prev = 15;
|
|
146
|
+
_context.next = 18;
|
|
147
|
+
return decoder.flush();
|
|
148
|
+
case 18:
|
|
149
|
+
_context.next = 23;
|
|
150
|
+
break;
|
|
151
|
+
case 20:
|
|
152
|
+
_context.prev = 20;
|
|
153
|
+
_context.t0 = _context["catch"](15);
|
|
154
|
+
// Firefox incorrectly throws an exception here
|
|
155
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1932566
|
|
156
|
+
_error = _context.t0;
|
|
157
|
+
case 23:
|
|
158
|
+
if (gotframe) {
|
|
159
|
+
_context.next = 25;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
return _context.abrupt("return", false);
|
|
163
|
+
case 25:
|
|
164
|
+
if (!(_error !== null)) {
|
|
165
|
+
_context.next = 27;
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
return _context.abrupt("return", false);
|
|
169
|
+
case 27:
|
|
170
|
+
return _context.abrupt("return", true);
|
|
171
|
+
case 28:
|
|
118
172
|
case "end":
|
|
119
173
|
return _context.stop();
|
|
120
174
|
}
|
|
121
|
-
}, _callee);
|
|
175
|
+
}, _callee, null, [[15, 20]]);
|
|
122
176
|
}));
|
|
123
177
|
return _checkWebCodecsH264DecodeSupport2.apply(this, arguments);
|
|
124
178
|
}
|
|
125
|
-
_checkWebCodecsH264DecodeSupport();
|
|
179
|
+
exports.supportsWebCodecsH264Decode = supportsWebCodecsH264Decode = await _checkWebCodecsH264DecodeSupport();
|
|
126
180
|
|
|
127
181
|
/*
|
|
128
182
|
* The functions for detection of platforms and browsers below are exported
|
package/lib/util/cursor.js
CHANGED
|
@@ -12,7 +12,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
12
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
14
14
|
* noVNC: HTML5 VNC client
|
|
15
|
-
* Copyright (C) 2019 The noVNC
|
|
15
|
+
* Copyright (C) 2019 The noVNC authors
|
|
16
16
|
* Licensed under MPL 2.0 or any later version (see LICENSE.txt)
|
|
17
17
|
*/
|
|
18
18
|
var useFallback = !_browser.supportsCursorURIs || _browser.isTouchDevice;
|
package/lib/util/element.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.clientToElement = clientToElement;
|
|
7
7
|
/*
|
|
8
8
|
* noVNC: HTML5 VNC client
|
|
9
|
-
* Copyright (C) 2020 The noVNC
|
|
9
|
+
* Copyright (C) 2020 The noVNC authors
|
|
10
10
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
11
11
|
*
|
|
12
12
|
* See README.md for usage and integration instructions.
|
package/lib/util/events.js
CHANGED
|
@@ -9,7 +9,7 @@ exports.setCapture = setCapture;
|
|
|
9
9
|
exports.stopEvent = stopEvent;
|
|
10
10
|
/*
|
|
11
11
|
* noVNC: HTML5 VNC client
|
|
12
|
-
* Copyright (C) 2018 The noVNC
|
|
12
|
+
* Copyright (C) 2018 The noVNC authors
|
|
13
13
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
14
14
|
*
|
|
15
15
|
* See README.md for usage and integration instructions.
|
package/lib/util/eventtarget.js
CHANGED
|
@@ -12,7 +12,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
/*
|
|
14
14
|
* noVNC: HTML5 VNC client
|
|
15
|
-
* Copyright (C) 2019 The noVNC
|
|
15
|
+
* Copyright (C) 2019 The noVNC authors
|
|
16
16
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
17
17
|
*
|
|
18
18
|
* See README.md for usage and integration instructions.
|
package/lib/util/int.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.toSigned32bit = toSigned32bit;
|
|
|
7
7
|
exports.toUnsigned32bit = toUnsigned32bit;
|
|
8
8
|
/*
|
|
9
9
|
* noVNC: HTML5 VNC client
|
|
10
|
-
* Copyright (C) 2020 The noVNC
|
|
10
|
+
* Copyright (C) 2020 The noVNC authors
|
|
11
11
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
12
12
|
*
|
|
13
13
|
* See README.md for usage and integration instructions.
|
package/lib/util/logging.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.getLogging = getLogging;
|
|
|
8
8
|
exports.initLogging = initLogging;
|
|
9
9
|
/*
|
|
10
10
|
* noVNC: HTML5 VNC client
|
|
11
|
-
* Copyright (C) 2019 The noVNC
|
|
11
|
+
* Copyright (C) 2019 The noVNC authors
|
|
12
12
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
13
13
|
*
|
|
14
14
|
* See README.md for usage and integration instructions.
|
package/lib/util/strings.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.decodeUTF8 = decodeUTF8;
|
|
|
7
7
|
exports.encodeUTF8 = encodeUTF8;
|
|
8
8
|
/*
|
|
9
9
|
* noVNC: HTML5 VNC client
|
|
10
|
-
* Copyright (C) 2019 The noVNC
|
|
10
|
+
* Copyright (C) 2019 The noVNC authors
|
|
11
11
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
12
12
|
*
|
|
13
13
|
* See README.md for usage and integration instructions.
|
package/lib/websock.js
CHANGED
|
@@ -20,7 +20,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
20
20
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
21
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /*
|
|
22
22
|
* Websock: high-performance buffering wrapper
|
|
23
|
-
* Copyright (C) 2019 The noVNC
|
|
23
|
+
* Copyright (C) 2019 The noVNC authors
|
|
24
24
|
* Licensed under MPL 2.0 (see LICENSE.txt)
|
|
25
25
|
*
|
|
26
26
|
* Websock is similar to the standard WebSocket / RTCDataChannel object
|
|
@@ -77,7 +77,7 @@ var Websock = exports["default"] = /*#__PURE__*/function () {
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
// Getters and
|
|
80
|
+
// Getters and setters
|
|
81
81
|
return _createClass(Websock, [{
|
|
82
82
|
key: "readyState",
|
|
83
83
|
get: function get() {
|
|
@@ -98,7 +98,7 @@ var Websock = exports["default"] = /*#__PURE__*/function () {
|
|
|
98
98
|
return "unknown";
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
// Receive
|
|
101
|
+
// Receive queue
|
|
102
102
|
}, {
|
|
103
103
|
key: "rQpeek8",
|
|
104
104
|
value: function rQpeek8() {
|
|
@@ -193,7 +193,7 @@ var Websock = exports["default"] = /*#__PURE__*/function () {
|
|
|
193
193
|
return false;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
// Send
|
|
196
|
+
// Send queue
|
|
197
197
|
}, {
|
|
198
198
|
key: "sQpush8",
|
|
199
199
|
value: function sQpush8(num) {
|
|
@@ -254,7 +254,7 @@ var Websock = exports["default"] = /*#__PURE__*/function () {
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
// Event
|
|
257
|
+
// Event handlers
|
|
258
258
|
}, {
|
|
259
259
|
key: "off",
|
|
260
260
|
value: function off(evt) {
|
|
@@ -355,7 +355,7 @@ var Websock = exports["default"] = /*#__PURE__*/function () {
|
|
|
355
355
|
if (this._rQbufferSize > MAX_RQ_GROW_SIZE) {
|
|
356
356
|
this._rQbufferSize = MAX_RQ_GROW_SIZE;
|
|
357
357
|
if (this._rQbufferSize - (this._rQlen - this._rQi) < minFit) {
|
|
358
|
-
throw new Error("Receive
|
|
358
|
+
throw new Error("Receive queue buffer exceeded " + MAX_RQ_GROW_SIZE + " bytes, and the new message could not fit");
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
if (resizeNeeded) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novnc/novnc",
|
|
3
|
-
"version": "1.5.0-
|
|
3
|
+
"version": "1.5.0-g4e410a0",
|
|
4
4
|
"description": "An HTML5 VNC client",
|
|
5
5
|
"browser": "lib/rfb",
|
|
6
6
|
"directories": {
|
|
@@ -56,8 +56,7 @@
|
|
|
56
56
|
"karma-safari-launcher": "latest",
|
|
57
57
|
"karma-script-launcher": "latest",
|
|
58
58
|
"mocha": "latest",
|
|
59
|
-
"
|
|
60
|
-
"po2json": "latest",
|
|
59
|
+
"pofile": "latest",
|
|
61
60
|
"sinon": "latest",
|
|
62
61
|
"sinon-chai": "latest"
|
|
63
62
|
},
|