Commit Graph

16 Commits

Author SHA1 Message Date
Pierre Ossman e35570227c Use CustomEvent for playback events
Stop abusing Event as that doesn't work everwhere.
2019-01-08 12:25:42 +01:00
Pierre Ossman 568f6567e1 Avoid using String.prototype.startsWith()
IE doesn't support it.
2019-01-08 12:25:01 +01:00
Pierre Ossman 527a1fd0ae Pre-convert recordings for playback
Convert the recordings ahead of time instead of during the playback.
That way we aren't messing up the profiling with time spent converting
data, rather than processing it.
2019-01-08 12:24:39 +01:00
Pierre Ossman 426a8c927b Enforce curly braces for control statements 2018-09-06 17:22:40 +02:00
Juanjo Diaz 651c23ece3 Use fat arrow functions `const foo = () => { ... };` for callbacks
and any other function that is passed around and it's not a top level function
2018-07-12 19:06:57 +02:00
Juanjo Diaz 0e4808bf6f Use ES6 classes
Always use the shorthand notation if the function is a method of an object or class `{ foo() { ... } }` or `class bar { foo() { ... } }`
unless it's a callback in which case you a fat arrow function should be used `{ cb: () => { ... } }`
2018-07-12 19:06:57 +02:00
Juanjo Diaz 2b5f94fa6a Prefer const/let over var 2018-05-24 00:27:09 +03:00
Juanjo Diaz 8727f598c2 Add eslint and fix reported issues 2018-05-24 00:25:44 +03:00
Pierre Ossman a92c33174e Update vnc_playback.html to follow current API
We had tried to update this along the way, but a bunch of things
were overlooked. Should be fully functional again now.
2018-01-26 11:07:14 +01:00
Samuel Mannehed d472f3f19e Abstract RFB errors to avoid sending strings
The API allowed strings to be passed from the RFB module to the
application using the disconnect reason. This caused problems since
the application didn't have control over translations for these
strings.

Most of the information being passed using this string was very
technical and not helpful to the end user. One exception to this was
the security result information regarding for example authentication
failures. The protocol allows the VNC server to pass a string
directly to the user in the security result.

So the disconnect reason is replaced by a boolean saying if the
disconnection was clean or not. And for the security result information
from the server, a new event has been added.
2017-11-14 15:36:12 +01:00
Samuel Mannehed 5b20d338ce Remove RFB.notification()
This interface was a band aid for poor design. The two cases where it
was used was replaced by logging.
2017-11-11 02:10:12 +01:00
Pierre Ossman 0ff97c1a24 Include optional log message on errors 2017-09-05 14:31:37 +02:00
Pierre Ossman b05a7b1dcf Handle new style recordings
Newer recordings are always binary and don't include the encoding
specifier.
2017-09-05 14:31:10 +02:00
Pierre Ossman 7c1f1a9cef Revert recording file format changes
Change back to the old, non-modular recording file format. The new
method doesn't work reliably and there are existing recordings already
out there that we might want to handle.
2017-05-22 13:44:48 +02:00
Samuel Mannehed afb621d577 Add missing semicolon 2017-05-13 01:56:35 +02:00
Solly Ross d6c17390f0 Make vnc_playback.html functional once more
This commit makes vnc_playback.html functional once more, and completely
refactors tests/playback.js to make it usable in other scenarios.

In order for vnc_playback.js to properly load playback files now, they
must `export` their variables.
2017-03-21 17:39:07 -04:00