Commit 9c80c191 authored by ibuler's avatar ibuler

[Update] 修改录像播放

parent 1a435fc1
...@@ -90,7 +90,7 @@ export class JsonComponent implements OnInit { ...@@ -90,7 +90,7 @@ export class JsonComponent implements OnInit {
.subscribe( .subscribe(
data => { data => {
this.replayData = data; this.replayData = data;
this.timeList = Object.keys(this.replayData).map(Number); this.timeList = Object.keys(this.replayData);
this.timeList = this.timeList.sort((a, b) => { this.timeList = this.timeList.sort((a, b) => {
return a - b; return a - b;
}); });
...@@ -134,7 +134,7 @@ export class JsonComponent implements OnInit { ...@@ -134,7 +134,7 @@ export class JsonComponent implements OnInit {
// } // }
for (; this.pos < this.timeList.length; this.pos++) { for (; this.pos < this.timeList.length; this.pos++) {
if (this.timeList[this.pos] * 1000 <= this.time) { if (this.timeList[this.pos] * 1000 <= this.time) {
this.term.write(this.replayData[this.timeList[this.pos].toString()]); this.term.write(this.replayData[this.timeList[this.pos]]);
} else { } else {
break; break;
} }
......
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