Commit Graph

160 Commits

Author SHA1 Message Date
Pierre Ossman 367bfd2962 Use JavaScript highlighting for Synax sections
Follows what MDN does, and makes things a bit easier to read.
2022-12-27 15:03:32 +01:00
Pierre Ossman 934e3de356 Follow current MDN for syntax examples
The now avoid brackets for optional arguments, so let's try to have the
same style.
2022-12-27 15:00:39 +01:00
Pierre Ossman 74fe694cc4 Fix toBlob() documentation
These are copy-and-paste errors from the toDataURL() section.
2022-12-27 15:00:13 +01:00
Pierre Ossman ce534b85c1 Fix indentation of toBlob()/toImage() docs
It isn't considered a code block if it isn't indented properly.
2022-12-27 14:58:16 +01:00
Pierre Ossman caf0ecc99b Consistent naming of RFB arguments
Make sure we call the arguments the same everywhere. Follow-up to commit
44d384b.
2022-12-27 14:55:06 +01:00
Pierre Ossman ceadcd6e83 Use reference style links in API docs
Makes everything a bit more readable.
2022-12-27 14:04:37 +01:00
Pierre Ossman 7f4a9eebc8 Export clipping state externally
So that UI can reflect if it is currently possible to drag the viewport
or not.
2022-12-27 12:50:57 +01:00
Pierre Ossman f172633715 Sort API alphabetically
So it is easier to find things as the API grows.
2022-12-27 12:20:40 +01:00
Frederik Fix edc7520e27 access to raw image data 2022-09-07 13:26:10 +02:00
Pierre Ossman cbe54acd1f Fix bad links in API documentation 2022-03-10 15:39:49 +01:00
Pierre Ossman cf7f7b57c5 Document new API for server verification
The new RSA AES security types have a mechanism for authenticating the
server that needs to be properly specified.
2022-03-10 15:39:12 +01:00
Pierre Ossman 301714928b Avoid scrolling on RFB object focus
Chrome scrolls the view to show as much as possible of the canvas when
we call focus(), which is likely not the desired behaviour.

This also exposes the ability to pass on future options when focusing
the RFB object manually.
2021-11-16 09:38:14 +01:00
Jan Zerebecki 89e206c146
add Man page and rename launch.sh to novnc_proxy.
Co-Authored-By: Adam Young <ayoung@redhat.com>
2021-06-25 13:54:04 +02:00
Pierre Ossman ae5f3f6909 Revert "Fixed a race condition when attaching to an existing socket"
This reverts commit ef27628c6d. By
bypassing setTimeout() it creates other race conditions so this is not
the proper fix for the issue.
2021-04-16 13:28:47 +02:00
Tim Stableford ef27628c6d Fixed a race condition when attaching to an existing socket
This is an error that presents itself with RTCDataChannel's, I suspect this could not
happen with a pre-existing WebSocket.

If the remote connection creates a data channel then the local (VNC) side gets a channel
created callback. It may also be the case that in that very same tick the socket is also
opened and buffered data received. This meant that (in my tests) about 1/3 of the time
noVNC would fail to respond to the initial message from the server because it was received
and subsequently not handled during that initial tick.

Also made the documentation reflect this new behaviour and document the existing behaviour.
2021-03-30 14:32:04 +01:00
Tim Stableford 44d384b99c Added support for RTCDataChannel
This work is originally by Ryan Castner <castner.rr@gmail.com> and
submitted as a PR here https://github.com/novnc/noVNC/pull/1362

Architecturally it is much the same except it doesn't rename a lot
of variables to make this more reviewable. It also avoids unrelated
changes such as replacing .onclose with an event listener, which
caused numerous test failures.

It also adds in ppoffice's fix to initialise the buffers.

Like the original author I don't have enough time available to
refactor this project to the new style event listeners.

Review cleanup for RTCDataChannel support (see below)

* More descriptive error when url or channel not set.
* Moved websocket property check to WebSock.
  This had unintended consequences in the tests that required some
  fixup. Mostly due to some tests not always passing FakeWebsocket.
  FakeWebsocket also needs to set the listeners to null to be compatible
  with what is in thw browser and expected by the property check code.
  The property check code now also takes into account class prototypes
  for test compatibility.
* Removed unreachable code.
* Reverted comment.
* Cleanup raw channel reference in rfb on websock close.
* Use readyState to check whether a socket is open rather than assuming.
* Updated RFB constructor documentation

Removed an unused boolean passed to attach
2021-03-04 18:55:06 +00:00
Pierre Ossman adfb99e7ec Update conversion documentation for Node.js
We now only support conversion to CommonJS, in order to support Node.js
older than version 15.
2020-12-30 15:57:02 +01:00
Pierre Ossman 32222304f4 Remove documentation about converting the app
This is no longer possible as we now require browser support for
modules.
2020-12-30 15:56:42 +01:00
Pierre Ossman 0630352e19 Merge branch 'rgbx' of https://github.com/CendioOssman/noVNC 2020-09-04 13:40:23 +02:00
Pierre Ossman 81898d7cea Remove note about clipboard ISO 8859-1 restriction
We now support full Unicode, provided the server also supports the
proper extension.
2020-07-07 10:38:06 +02:00
Pierre Ossman 50cde2faab Move mouse event handling to RFB class
Move the last remaining bits to the RFB class to keep things simple, as
the Mouse class no longer provides any real value.
2020-06-12 14:36:10 +02:00
Pierre Ossman 8be924c9d9 Add touch gestures for mouse emulation
Add several single and multitouch gestures to simulate various mouse
actions that would otherwise be impossible to perform.

This replaces the old system where you could select which mouse button
a single touch would generate.
2020-06-12 09:18:46 +02:00
Pierre Ossman f5b5767c98 Standardise on a single blit function
Keep everything simpler by always blitting in the same pixel format.
It's up to the decoders to convert if they need to.
2020-06-08 07:53:41 +02:00
Pierre Ossman 224f95f997 Move tile handling to Hextile decoder
It is only used there so no need for it to be in the general
Display class.
2020-06-06 13:23:05 +02:00
Samuel Mannehed 479d8cefd1 Add ability to set compression level
Fixes github issue #1382.
2020-05-01 20:47:36 +02:00
Ingo Blechschmidt 27a6978e30
Document default setting of `focusOnClick` 2020-04-29 09:36:32 +02:00
Pierre Ossman 5243cbf611 Add UI for quality setting 2020-02-28 14:54:09 +01:00
Andrey Trebler efd1f8a4f2 adds qualityLevel property to RFB class for updating JPEG quality level encoding on the fly 2020-02-28 13:14:19 +01:00
Pierre Ossman 4babdf33bd Validate decoded image dimensions
They are expected to be a certain size, so verify this so no server
tries to do something broken.
2019-12-23 15:42:02 +01:00
Pierre Ossman e5255fc246 Remove pointless Display.clear()
It served no meaningful purpose and it had bugs. So let's remove it
rather than try to fix it.
2019-08-23 15:05:58 +02:00
Pierre Ossman 3855a7bee4 Remove unused Display.logo attribute 2019-08-23 15:04:23 +02:00
Pierre Ossman 6aed0b4dd2 Deprecate showDotCursor option for RFB constructor
It is not relevant for the connection stage so it should not have
been a constructor argument to begin with. Ship with a warning for
a release before we remove it.
2019-08-23 14:00:20 +02:00
Samuel Mannehed e14aa4d0fe Add documentation for the option showDotCursor
This is not only a property, it's also a parameter to the constructor.
2019-07-23 16:07:17 +02:00
Samuel Mannehed c912230309 Remove the default value of wsProtocols
Using the 'binary' protocol by default is very non-standard.
2019-07-23 16:03:49 +02:00
Samuel Mannehed 21387f9c24
Merge pull request #1262 from shiramax/sub_protocols
Add support in websocket sub-protocols
2019-07-23 15:24:10 +02:00
Shira Maximov 25b3d49d32 Add support in websocket sub-protocols 2019-07-23 13:44:18 +03:00
Samuel Mannehed 21ac6ca0f2
Update link to websock.js API 2019-07-15 14:05:24 +02:00
Mykola Mokhnach d7791ebbcd Make the screen background cutomizable 2019-01-18 19:36:23 +01:00
Alexander E. Patrakov 4c38179d15 Show dot when there is no visible cursor
Disabled by default.
2018-09-14 20:31:59 +05:00
Alexander E. Patrakov 599588fe5f Documented browser cache issue 2018-07-22 23:03:05 +08:00
Pierre Ossman 67fefcf184 Merge branch 'cursor' of https://github.com/CendioOssman/noVNC 2018-07-11 13:39:37 +02:00
Juanjo Diaz 2b5f94fa6a Prefer const/let over var 2018-05-24 00:27:09 +03:00
Pierre Ossman b475eed5fa Separate out cursor handling
Make cursor handling more generic in preparation for generic handling
of corner cases.
2018-03-15 17:22:21 +01:00
Samuel Mannehed 3f9ca4f5dc Move VERSION to top-level 2018-03-15 14:33:09 +01:00
Samuel Mannehed 25cbf00e13 Remove docs/release.txt
Instructions has been moved to the wiki:

https://github.com/novnc/noVNC/wiki/Development:-Making-a-release
2018-03-15 14:28:08 +01:00
Samuel Mannehed a07d4abe1f Fix docs/VERSION 2018-03-15 09:28:18 +01:00
Pierre Ossman edb3ea4f88 Merge branch 'docs' of https://github.com/CendioOssman/noVNC 2017-12-12 12:41:30 +01:00
Pierre Ossman 91e811f7af Add documentation for integrating noVNC 2017-12-12 08:12:20 +01:00
Pierre Ossman addf16c619 Update licensing information
The first page now points to the more complete licensing document,
and some no longer used licenses have been removed.
2017-12-08 16:23:12 +01:00
Pierre Ossman 9b84f51685 Move resize handling in to RFB object
Makes the API simpler and makes it easier for other frontends to
get this functionality.
2017-12-06 11:29:57 +01:00