Added definitions for noVNC (https://github.com/kanaka/noVNC)

This commit is contained in:
Ken Smith
2013-02-15 09:55:02 -08:00
parent 24dcdc3db0
commit 0a110d3777
2 changed files with 172 additions and 0 deletions

32
noVNC/noVNC-tests.ts Normal file
View File

@@ -0,0 +1,32 @@
///<reference path="noVNC.d.ts" />
Util.load_scripts(["webutil.js", "base64.js", "websock.js", "des.js",
"input.js", "display.js", "jsunzip.js", "rfb.js"]);
var rfb:RFB;
function setPassword() {
rfb.sendPassword('password');
}
function sendCtrlAltDel() {
rfb.sendCtrlAltDel();
}
function init() {
var host:string, port:number, password:string, path:string, token;
var canvas = <HTMLCanvasElement>document.getElementById('noVNC_canvas');
rfb = new RFB({
target: canvas,
encrypt: true,
repeaterID: "myrepeaterid",
true_color: true,
local_cursor: true,
shared: true,
view_only: true,
updateState: true,
onPasswordRequired: (rfb: RFB) => { }
});
rfb.connect(host, port, password, path);
};