]> git.proxmox.com Git - mirror_novnc.git/blob - docs/LIBRARY.md
Add extended clipboard Pseudo-Encoding
[mirror_novnc.git] / docs / LIBRARY.md
1 # Using the noVNC JavaScript library
2
3 This document describes how to make use of the noVNC JavaScript library for
4 integration in your own VNC client application. If you wish to embed the more
5 complete noVNC application with its included user interface then please see
6 our [embedding documentation](EMBEDDING.md).
7
8 ## API
9
10 The API of noVNC consists of a single object called `RFB`. The formal
11 documentation for that object can be found in our [API documentation](API.md).
12
13 ## Example
14
15 noVNC includes a small example application called `vnc_lite.html`. This does
16 not make use of all the features of noVNC, but is a good start to see how to
17 do things.
18
19 ## Conversion of Modules
20
21 noVNC is written using ECMAScript 6 modules. Many of the major browsers support
22 these modules natively, but not all. They are also not supported by Node.js. To
23 use noVNC in these places the library must first be converted.
24
25 Fortunately noVNC includes a script to handle this conversion. Please follow
26 the following steps:
27
28 1. Install Node.js
29 2. Run `npm install` in the noVNC directory
30 3. Run `./utils/use_require.js --as <module format>`
31
32 Several module formats are available. Please run
33 `./utils/use_require.js --help` to see them all.
34
35 The result of the conversion is available in the `lib/` directory.