From 2addca1ca440c6a5ad98161c016d67ca12839097 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 21 Jul 2021 17:09:34 -0600 Subject: [PATCH] Fix duration placeholder parsing for audio files --- src/voice/PlaybackClock.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/voice/PlaybackClock.ts b/src/voice/PlaybackClock.ts index 4f3d4e6dbb..712d1bfa94 100644 --- a/src/voice/PlaybackClock.ts +++ b/src/voice/PlaybackClock.ts @@ -103,8 +103,8 @@ export class PlaybackClock implements IDestroyable { * @param {MatrixEvent} event The event to use for placeholders. */ public populatePlaceholdersFrom(event: MatrixEvent) { - const durationSeconds = Number(event.getContent()['info']?.['duration']); - if (Number.isFinite(durationSeconds)) this.placeholderDuration = durationSeconds; + const durationMs = Number(event.getContent()['info']?.['duration']); + if (Number.isFinite(durationMs)) this.placeholderDuration = durationMs / 1000; } /**