diff --git a/tests/playback.js b/tests/playback.js
index fe551eb7..94b75be8 100644
--- a/tests/playback.js
+++ b/tests/playback.js
@@ -91,18 +91,18 @@ export default class RecordingPlayer {
this._trafficManagement = (trafficManagement === undefined) ? !realtime : trafficManagement;
this._running = true;
-
- this._queueNextPacket();
}
// _enablePlaybackMode mocks out things not required for running playback
_enablePlaybackMode() {
+ const self = this;
this._rfb._sock.send = () => {};
this._rfb._sock.close = () => {};
this._rfb._sock.flush = () => {};
this._rfb._sock.open = function () {
this.init();
this._eventHandlers.open();
+ self._queueNextPacket();
};
}
diff --git a/tests/vnc_playback.html b/tests/vnc_playback.html
index b1450524..353f03df 100644
--- a/tests/vnc_playback.html
+++ b/tests/vnc_playback.html
@@ -2,8 +2,22 @@
VNC Playback
-
-
+
+
+
+
+
+
+
diff --git a/utils/launch.sh b/utils/launch.sh
index 2007c858..ee2ca5ea 100755
--- a/utils/launch.sh
+++ b/utils/launch.sh
@@ -24,6 +24,8 @@ usage() {
echo " Default: ./"
echo " --ssl-only Disable non-https connections."
echo " "
+ echo " --record FILE Record traffic to FILE.session.js"
+ echo " "
exit 2
}
@@ -36,6 +38,7 @@ CERT=""
WEB=""
proxy_pid=""
SSLONLY=""
+RECORD_ARG=""
die() {
echo "$*"
@@ -63,6 +66,7 @@ while [ "$*" ]; do
--cert) CERT="${OPTARG}"; shift ;;
--web) WEB="${OPTARG}"; shift ;;
--ssl-only) SSLONLY="--ssl-only" ;;
+ --record) RECORD_ARG="--record ${OPTARG}"; shift ;;
-h|--help) usage ;;
-*) usage "Unknown chrooter option: ${param}" ;;
*) break ;;
@@ -145,7 +149,7 @@ fi
echo "Starting webserver and WebSockets proxy on port ${PORT}"
#${HERE}/websockify --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
-${WEBSOCKIFY} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
+${WEBSOCKIFY} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} ${RECORD_ARG} &
proxy_pid="$!"
sleep 1
if ! ps -p ${proxy_pid} >/dev/null; then