Commit Graph

13 Commits

Author SHA1 Message Date
Joel Martin ce3bdbccc2 Catch Mozilla prefixing of WebSocket.
Pull 475cfae from websockify.

In Firefox 7 Mozilla has added Websockets support but prefixed the
constructor with "Moz".
2011-08-02 08:02:51 -05:00
Joel Martin 61fc1f2287 Remove extraneous question mark.
Part of https://github.com/kanaka/noVNC/issues/69

Pull from websockify b590289de5.
2011-06-28 16:29:29 -05:00
Joel Martin 0b7bc4e986 Only append random string to swf path in IE.
Issue https://github.com/kanaka/noVNC/issues/69

Thanks https://github.com/EdSchouten for the catch.

Import from websockify 9a2b50d8.
2011-06-28 16:22:50 -05:00
Joel Martin fa8f14d56d Fix playback of recorded VNC.
- Update test mode calls to work with separate websock module.

- Pull in include/websock.js update 7f487fdbd from websockify.
2011-06-26 14:17:42 -05:00
Joel Martin d890e8640f API changes/cleanup.
API changes:
    - include/canvas.js renamed to include/display.js
    - Display.rescale() method removed from API. Use Display.set_scale() instead.
    - Make logo configuration attribute of Display and display it when
      clear() is called if it is set.

API deprecations:
    - use RFB onUpdateState instead of updateState.
    - use RFB onClipboard instead of clipboardReceive.

See https://github.com/kanaka/noVNC/wiki/ModuleAPI for detailed noVNC
modules and API description.

Expand and normalize the event/callback interfaces. Standize on
"onEventName" form for callbacks.

    Callback Renames:
        - RFB updateState -> onUpdateState
        - RFB clipboardReceive -> onClipboard
        - Keyboard keyPress -> onKeyPress
        - Mouse mouseButton -> onMouseButton
        - Mouse mouseMove -> onMouseMove

    Callback Additions:
        - RFB onPasswordRequired
        - RFB onBell
        - RFB onFBUReceive
        - RFB onFBUComplete

Other:
- Add array type support to Util.conf_default()
- Removed a bunch of routines from the Display API that were just used
  internally and not actually by noVNC: flush, setFillColor,
  imageDataGet, imageDataCreate, rgbxImageData, rgbxImageFill,
  cmapImageData, cmapImageFill.
- More keyboard/mouse logging when debug turned on.
- Some JSLinting
2011-05-11 15:55:44 -05:00
Joel Martin f31eeaa8ab Stop sending empty frames.
Pull from websockify a339a4856.
2011-05-09 17:22:02 -05:00
Joel Martin bbd21ca7b5 Update web-socket-js to bb5797cad.
Syncs with same change to websockify (7534574a2f).

Primary change is removal of FABridge interface.

Seems to improve overall latency by perhaps 10%. Also, the slowdown
over time in Opera is about half as bad (but still there).
2011-03-16 10:33:01 -05:00
Joel Martin 43cf7bd83b Some JSLint'ing 2011-02-19 16:44:10 -06:00
Joel Martin 0981845ec4 IE9 fixes. Works but slow. API change.
API change: changed include path variable from VNC_uri_prefix to
URI_INCLUDE since websock.js uses the variable and websock.js is no
longer just for noVNC (i.e. websockify is really the canonical
location for websock.js).

Changes to get web-socket-js to work. Right now it's a hack to get
around: https://github.com/gimite/web-socket-js/issues#issue/41. The
hack is to disable caching of the flash objects by appending
"?" + Math.random() to the end of the flash object path (but only when
using IE).
2011-01-30 22:58:22 -06:00
Joel Martin 7cc5fbc52e Opera 11 WebSockets and Opera '-' key mapping fix.
Opera 11 native WebSockets (if enabled) seems to have bad behavior for
the bufferedAmount so add change from websockify project to allow max
bufferedAmount (before send queue is delay) to be configured.

Also, Opera 11 and 10.60 behave like Mozilla regarding the '-' key so
translate it correctly.
2011-01-23 19:36:11 -06:00
Joel Martin 1756a30a48 websock.send returns true/false.
If all send data was flushed from the send queue then return true,
otherwise false. This doesn't mean the data won't be sent, just that
it wasn't sent this time and is queued.
2011-01-23 19:21:04 -06:00
Joel Martin 8b502df2a1 Tolerate some bufferedAmount.
Only delay sending data if bufferedAmount is greater than 1000.

This seems to match the intention of the spec better. bufferedAmount
does not mean that we can't send, it's just an indication that the
network is becoming saturated. But Opera 11 native WebSockets seems to
have a bug that bufferedAmount isn't set back to zero correctly so
we'll be a bit more tolerant.
2011-01-23 19:17:59 -06:00
Joel Martin 72f1348b35 Convert to Websock library.
Copy in include/websock.js from websockify and use that instead. Still
some cleanup of network code but it's a good start.
2011-01-13 00:30:08 -06:00