Support password auth recordings for playback

When password auth is enabled on the server, the RFB object sends a
'credentialsrequired' event to the UI. This commit adds support for
this event to our recoding playback.
This commit is contained in:
Pierre Ossman 2018-08-16 15:32:09 +02:00 committed by Samuel Mannehed
parent 22000b93d5
commit 16f0861501
1 changed files with 8 additions and 0 deletions

View File

@ -79,6 +79,8 @@ export default class RecordingPlayer {
this._rfb.viewOnly = true;
this._rfb.addEventListener("disconnect",
this._handleDisconnect.bind(this));
this._rfb.addEventListener("credentialsrequired",
this._handleCredentials.bind(this));
this._enablePlaybackMode();
// reset the frame index and timer
@ -191,4 +193,10 @@ export default class RecordingPlayer {
this._running = false;
this._disconnected(evt.detail.clean, this._frame_index);
}
_handleCredentials(evt) {
this._rfb.sendCredentials({"username": "Foo",
"password": "Bar",
"target": "Baz"});
}
}