Commit a8d78e55 authored by liuzheng712's avatar liuzheng712

feat: fast fast fast

parent bbf18d96
#!/usr/bin/env python3 #!/usr/bin/env python3
from flask import Flask, send_from_directory, render_template, request, jsonify, send_file from flask import Flask, send_from_directory, render_template, request, jsonify, redirect, url_for
from flask_socketio import SocketIO, Namespace, emit, join_room, leave_room from flask_socketio import SocketIO, Namespace, emit, join_room, leave_room
import paramiko import paramiko
import uuid import uuid
...@@ -206,7 +206,7 @@ def asset_groups_assets(): ...@@ -206,7 +206,7 @@ def asset_groups_assets():
@app.route('/api/terminal/v1/sessions/test/replay/') @app.route('/api/terminal/v1/sessions/test/replay/')
def replay(): def replay():
return send_file('test.json') return redirect("http://jps.ilz.me/media/2017-12-24/ec87a486-0344-4f12-b27a-620321944f7f.gz")
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -37,10 +37,6 @@ export class JsonComponent implements OnInit { ...@@ -37,10 +37,6 @@ export class JsonComponent implements OnInit {
} }
} }
start() {
console.log(Video.timelist);
}
restart() { restart() {
clearInterval(this.timer); clearInterval(this.timer);
term.term.reset(); term.term.reset();
...@@ -53,6 +49,7 @@ export class JsonComponent implements OnInit { ...@@ -53,6 +49,7 @@ export class JsonComponent implements OnInit {
} }
pause() { pause() {
console.log(Video.timelist);
if (this.toggle) { if (this.toggle) {
clearInterval(this.timer); clearInterval(this.timer);
this.toggle = !this.toggle; this.toggle = !this.toggle;
...@@ -79,6 +76,9 @@ export class JsonComponent implements OnInit { ...@@ -79,6 +76,9 @@ export class JsonComponent implements OnInit {
this.toggle = !this.toggle; this.toggle = !this.toggle;
clearInterval(that.timer); clearInterval(that.timer);
} }
if (Video.timelist[that.pos] - Video.timelist[that.pos - 1] > 5) {
that.time += 5000;
}
that.time += that.TIMESTEP; that.time += that.TIMESTEP;
that.setPercent = that.time / Video.totalTime * 100; that.setPercent = that.time / Video.totalTime * 100;
...@@ -100,7 +100,7 @@ export class JsonComponent implements OnInit { ...@@ -100,7 +100,7 @@ export class JsonComponent implements OnInit {
break; break;
} }
} }
this.time = Video.timelist[this.pos]; this.time = Video.totalTime * this.setPercent / 100;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment