Skip to content

Commit 1a2b74c

Browse files
committed
Support video duration in events
1 parent 83f2dd1 commit 1a2b74c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wrappers/visuals/recorder.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ class Recorder extends Despot {
331331
const width = this.getRecorderWidth(true);
332332
const height = this.getRecorderHeight(true);
333333

334-
this.emit("PREVIEW", { key: this.key, width, height, hasAudio, duration: -1 });
334+
const duration = args.duration ?? -1;
335+
336+
this.emit("PREVIEW", { key: this.key, width, height, hasAudio, duration });
335337

336338
// keep it for recording stats
337339
if (this.stopTime) {

0 commit comments

Comments
 (0)