Fix perf/playback tool
Somewhere along the way, the refactors broke playback.js. This fixes the actual functionality, and makes its JS loading match that in vnc.html.
This commit is contained in:
parent
f9b6d7665d
commit
cccf3b008a
|
@ -89,18 +89,18 @@ export default class RecordingPlayer {
|
||||||
this._trafficManagement = (trafficManagement === undefined) ? !realtime : trafficManagement;
|
this._trafficManagement = (trafficManagement === undefined) ? !realtime : trafficManagement;
|
||||||
|
|
||||||
this._running = true;
|
this._running = true;
|
||||||
|
|
||||||
this._queueNextPacket();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// _enablePlaybackMode mocks out things not required for running playback
|
// _enablePlaybackMode mocks out things not required for running playback
|
||||||
_enablePlaybackMode() {
|
_enablePlaybackMode() {
|
||||||
|
const self = this;
|
||||||
this._rfb._sock.send = () => {};
|
this._rfb._sock.send = () => {};
|
||||||
this._rfb._sock.close = () => {};
|
this._rfb._sock.close = () => {};
|
||||||
this._rfb._sock.flush = () => {};
|
this._rfb._sock.flush = () => {};
|
||||||
this._rfb._sock.open = function () {
|
this._rfb._sock.open = function () {
|
||||||
this.init();
|
this.init();
|
||||||
this._eventHandlers.open();
|
this._eventHandlers.open();
|
||||||
|
self._queueNextPacket();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,22 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>VNC Playback</title>
|
<title>VNC Playback</title>
|
||||||
<script src="/vendor/browser-es-module-loader/dist/browser-es-module-loader.js"></script>
|
<!-- promise polyfills promises for IE11 -->
|
||||||
<script type="module" src="./playback.js"></script>
|
<script src="../vendor/promise.js"></script>
|
||||||
|
<!-- ES2015/ES6 modules polyfill -->
|
||||||
|
<script type="module">
|
||||||
|
window._noVNC_has_module_support = true;
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
if (window._noVNC_has_module_support) return;
|
||||||
|
var loader = document.createElement("script");
|
||||||
|
loader.src = "vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
|
||||||
|
document.head.appendChild(loader);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<!-- actual script modules -->
|
||||||
|
<script type="module" src="./playback-ui.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue