From 91dc54c7b8389e25e21a3caa54c37b8456e376ba Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Sat, 12 Sep 2020 15:12:23 +0800 Subject: [PATCH] close #342 send SET_SPEED event when setConfig --- src/replay/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/replay/index.ts b/src/replay/index.ts index 915dbf29..4fb0f738 100644 --- a/src/replay/index.ts +++ b/src/replay/index.ts @@ -207,6 +207,14 @@ export class Replayer { if (!this.config.skipInactive) { this.backToNormal(); } + if (typeof this.config.speed !== 'undefined') { + this.speedService.send({ + type: 'SET_SPEED', + payload: { + speed: config.speed!, + }, + }); + } } public getMetaData(): playerMetaData {