Pierre Ossman
e89eef94aa
Use standard EventTarget interface for events
2017-11-09 13:14:16 +01:00
Pierre Ossman
65fdfeae13
Remove unused options argument in onnotification event handler
2017-11-09 13:13:41 +01:00
Pierre Ossman
2f4516f293
Integrate connect() in to constructor
...
An RFB object represents a single connection so it doesn't make
sense to have one without it trying to connect right away. Matches
the behaviour of other APIs, e.g. WebSocket.
2017-11-09 13:13:41 +01:00
Pierre Ossman
68e09edcdc
Remove disconnectTimeout property
...
Callers should not need to modify this timeout.
2017-11-09 13:13:41 +01:00
Pierre Ossman
002907d2ce
Remove "downscale only" mode
...
The normal scaling mode should be sufficient for most use cases, so
let's keep the interface simple.
2017-11-09 13:13:41 +01:00
Pierre Ossman
8d1f0a3de8
Remove local cursor setting
...
We have no reason to disable this except for touch devices, which
we can handle without having a setting for it.
2017-11-09 13:13:41 +01:00
Pierre Ossman
0460e5fdbe
Improve naming for viewport properties
2017-11-09 13:13:41 +01:00
Pierre Ossman
a80aa41628
Change clippingDisplay() to a property
...
It fits much better as a property given that it only tells what the
current state of things are.
2017-11-09 13:13:41 +01:00
Pierre Ossman
15a6269510
Remove some unused return values
2017-11-09 13:13:41 +01:00
Pierre Ossman
747b462337
Use standard JavaScript properties
...
Use normal properties with JavaScript setters and getters instead of
our homegrown stuff.
This also changes the properties to follow normal naming conventions.
2017-11-09 13:03:32 +01:00
Pierre Ossman
fdff59eeb4
Move cursor URI check to RFB object
...
Keeps the Display object simpler, and avoids having to abuse a
property to transfer the information.
2017-11-09 12:52:05 +01:00
Pierre Ossman
656858a6d6
Remove render_mode property
...
It can only have a single value these days, so it is no longer
useful.
2017-11-09 12:52:05 +01:00
Pierre Ossman
3d7bb02036
Change some attributes to arguments
...
Some attributes are better suited as arguments, primarily because they
are associated with a specific method and cannot be changed later.
2017-11-09 12:52:05 +01:00
Pierre Ossman
ebf1c0f991
Always include ID marker in repeater protocol
...
This makes sure we're always following the protocol, and the caller
doesn't have to care about the details.
2017-11-09 12:52:05 +01:00
Pierre Ossman
f8318361b1
Remove wsProtocols setting
...
It isn't in use anymore since we deprecated support for Base64 mode.
2017-11-09 12:52:05 +01:00
Pierre Ossman
5b4e5d016e
Switch to URL for connect()
...
This is more in line with how other JavaScript APIs work.
2017-11-09 12:52:05 +01:00
Pierre Ossman
c7d08d721f
Tidy up variable initialisation
...
Sort things by category, and organise everything in the same place.
We don't support reuse of RFB objects so we can safely init everything
in the constructor.
2017-11-09 12:52:05 +01:00
Pierre Ossman
30691b668e
Remove onFBU* callbacks
...
They are internal mechanisms that callers should be isolated from.
2017-11-09 12:52:03 +01:00
Pierre Ossman
832be2625b
Add resize as a capability
...
Makes the API more transparent than piggybacking on completion
of the first framebuffer update.
2017-11-09 12:51:15 +01:00
Pierre Ossman
cd523e8f28
Make power API generic
...
Decouple it from XVP and make it a generic API.
2017-11-09 12:47:21 +01:00
Pierre Ossman
85b35fc0cc
Add proper protocol encoder for XVP messages
2017-11-09 12:45:08 +01:00
Pierre Ossman
430f00d6fe
Allow other credentials than just password
...
Makes the XVP authentication mechanism more general.
2017-11-09 12:45:05 +01:00
Pierre Ossman
233c8b6a53
Hide keyboard object from RFB callers
2017-10-27 13:58:12 +02:00
Pierre Ossman
f976b5500e
Hide mouse object from RFB callers
2017-10-27 13:58:12 +02:00
Pierre Ossman
b9854a5ca5
Hide display object from RFB callers
2017-10-27 13:58:11 +02:00
Pierre Ossman
458086177c
Let RFB object make sure canvas can have focus
...
Let's set up things properly ourselves instead of forcing everyone
to create their canvas element just like we want it.
2017-10-18 17:01:34 +02:00
Pierre Ossman
4c11755ce7
Merge branch 'focus' of https://github.com/CendioOssman/noVNC
2017-10-18 15:12:46 +02:00
Pierre Ossman
2afda54456
Only grab key events on canvas
...
Give the canvas proper focus handling. This avoids messy logic that
needs to disable and enable event handling when we want to interact
with other UI elements.
It also makes sure we can properly inhibit the browser from triggering
local actions on key presses.
2017-10-18 15:07:17 +02:00
Samuel Mannehed
abfe5b7a37
Wait for challenge before asking for password
...
Fixes #928 .
2017-10-16 15:39:10 +02:00
Samuel Mannehed
cd23036314
Fix missing semicolons
...
Was missing in commit 49a8183757
2017-10-12 12:42:16 +02:00
Samuel Mannehed
4a818a7ddd
Merge pull request #893 from CendioOssman/amt
...
Basic support for Intel AMT
2017-10-05 16:59:53 +02:00
Pierre Ossman
8290d3f271
Merge branch 'optional-port' of https://github.com/bkylerussell/noVNC
2017-09-29 16:26:02 +02:00
Pierre Ossman
5a5f5ada58
Basic support for Intel AMT
...
This restores basic support for Intel AMT servers. They refuse clients
that request more than 16 bits per pixels, so implement a fallback
in just the "Raw" encoding.
2017-09-22 15:17:56 +02:00
Pierre Ossman
cd74793b44
Always hide local cursor initally
...
We don't know if the server will support a client side cursor, so
we have to assume a server side one to start with.
2017-09-22 15:17:56 +02:00
Pierre Ossman
c7c6cb196d
Remove rect arguments onFBUComplete callback
...
This callback is for an entire FBU, so it's not really relevant
to include info about just a single of the included rects.
2017-09-22 15:17:56 +02:00
Pierre Ossman
49a8183757
Clean up encoding handling
...
Allow things to be more explicit and dynamic. Makes it easier to read
and allows us to have more flexible selection of encodings in the future.
2017-09-22 15:17:56 +02:00
Samuel Mannehed
c1e2785fb6
Split devices.js into keyboard.js and mouse.js
2017-09-17 18:23:57 +02:00
Pierre Ossman
c338622719
Build encoding stats array dynamically
...
Avoids having to hard code which encodings we might see.
2017-09-07 17:18:25 +02:00
Pierre Ossman
f8ec2df2bb
Add helper for encoding enumeration and names
2017-09-07 17:18:25 +02:00
Pierre Ossman
3e8b26ab58
Remove unused encoding handlers
...
These should never be sent by a server, so we don't need handlers
for them.
2017-09-07 17:18:25 +02:00
Pierre Ossman
bc86b63c24
Remove unused helper for Tight encoding
...
It's already been inlined where used.
2017-09-07 17:18:25 +02:00
Pierre Ossman
910fd3afc9
Fix handling of ExtendedDesktopSize errors
2017-09-07 17:18:25 +02:00
Pierre Ossman
91d5c62589
Merge resize handling to single method
...
It also fits better in the core RFB object rather than as a helper
for the encoding handlers.
2017-09-07 17:18:25 +02:00
shaneharris
b5c982ea42
fix typscript error - the only one. ( #837 )
...
* fix typscript error TypeScript error: novnc/core/rfb.js(1012,17): Error TS7027: Unreachable code detected.
* Update rfb.js
2017-08-05 02:29:50 +02:00
Pierre Ossman
be70fe0a3d
Only send QEMU Extended Key Event if we have a scan code
...
Servers will assume that a scan code is present if this message type
is used, so fall back to the standard key event message if we don't
know the scan code.
2017-07-07 15:06:13 +02:00
Pierre Ossman
2bf4cf5a20
try/catch guard for QEMU keyboard test
...
Safari on older iOS doesn't support creating KeyboardEvent objects,
so put a guard in to avoid crashes.
2017-07-06 13:00:00 +02:00
Pierre Ossman
459ed0083f
Allow key events without symbols
...
They can still be useful if the server makes use of the keycode instead.
2017-06-02 14:37:36 +02:00
Pierre Ossman
26586b9ddf
Remove colour map support
...
It was broken and unused. Remove it so we can simplify the code.
2017-05-04 15:13:33 +02:00
Pierre Ossman
545442afc3
Merge branch 'keyboard' of https://github.com/CendioOssman/noVNC
2017-05-04 12:18:55 +02:00
Pierre Ossman
9e6f71cb75
Remove modifier synchronisation
...
The fields provided cannot tell us if it is the left or right
version of the key that's pressed, so they are inherently unreliable.
It is also not a huge problem in practice as we'll get in sync on
the next press or release of the modifier.
2017-05-04 12:13:47 +02:00