Skip to content

Commit d443aa9

Browse files
fhiutcZhaoJiSen
authored andcommitted
fix: get correct current time on ascii player
1 parent 461f1a8 commit d443aa9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/elements/replay/asciicast/asciicast.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ export class ElementReplayAsciicastComponent implements OnInit, AfterViewInit {
170170
/**
171171
* 重置播放器并保持当前播放位置和状态
172172
*/
173-
private resetPlayerWithCurrentTime() {
173+
private async resetPlayerWithCurrentTime() {
174174
if (!this.player) return;
175175

176-
this.currentTime = this.player.getCurrentTime();
176+
this.currentTime = await this.player.getCurrentTime();
177177

178178
if (isNaN(this.currentTime) || this.currentTime < 0) {
179179
this.currentTime = 0;

0 commit comments

Comments
 (0)