Changed underlying socket to _rawChannel instead of _webChannel. Reverted some log statements to use more public facing Connection word rather than the internal api WebChannel word. Reverted log usage of underyling channel type (rtc or websocket) to class name WebChannel instead.
* origin/master:
Fix focus problem after closing the toolbar
Set a default value for the quality input
Add UI for quality setting
adds qualityLevel property to RFB class for updating JPEG quality level encoding on the fly
Hide clipboard side bar button when view only mode
Fix crash with too large clipboard data
Style all input types for consistent UI
Add extended clipboard Pseudo-Encoding
Export constants in inflate.js for easier usage
Fix bug where inflate would read too much data
Split api of inflate
Handle errors from zlib/pako
Move error handling to Inflate class
Add missing copyright header for Inflator.js
Remove unused inflate argument
Add util for unsigned and signed int. conversion
Add deflator helper class for deflating data
Make clipBoardPasteFrom() test more specific
Correcting path to package.json for running at a path other than root.
Closing the toolbar would make the focus remain on the toolbar and
not in the session. The only way to switch focus was to click in the
session. This commit will automatically switch back focus to the session
after closing the toolbar.
If too much text is copied in the session, String.fromCharCode.apply()
would crash in Safari on macOS and Chrome on Linux. This commit fixes
this issue by avoiding apply() altogether. Also added test to cover this
issue.
The main change is to the connect() method which now checks the urlOrChannel variable to determine which arguments to pass to WebChannel.open. The url case remains largely the same, we simply check that it is of type string. If a WebSocket or RTCDataChannel is passed, we use the object prototypes constructor name to determine the type of the instance variable provided is one which we expect and then forward it on to WebChannel.open, along with the name so we dont have to do the same work in WebChannel. We use Object.getPrototypeOf because accessing the __proto__ directly is not recommended.
The name WebChannel was chosen to represent the opaque datachannel used, either WebSocket or RTCDataChannel. The open method was refactored to take an object of uri and protocols or webChannel and channelType. We introduce a channelStates enum and helper method that provides compatible states across WebSocket and RTCDataChannel. Call sites for logging are refactored to list the channelType (WebSocket or RTCDataChannel) to be more descriptive.
As a rule, instead of hard-coding a behavior on specific platforms we
should do dynamic detection.
This commit moves away from always hiding scrollbars on Android and iOS
and instead detects the rendered width of scrollbars in the browser.