Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit b3d14de

Browse files
authored
Merge pull request #6435 from matrix-org/travis/voice-messages/duration
Fix duration placeholder parsing for audio files
2 parents 0bb0c81 + 2addca1 commit b3d14de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/voice/PlaybackClock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ export class PlaybackClock implements IDestroyable {
103103
* @param {MatrixEvent} event The event to use for placeholders.
104104
*/
105105
public populatePlaceholdersFrom(event: MatrixEvent) {
106-
const durationSeconds = Number(event.getContent()['info']?.['duration']);
107-
if (Number.isFinite(durationSeconds)) this.placeholderDuration = durationSeconds;
106+
const durationMs = Number(event.getContent()['info']?.['duration']);
107+
if (Number.isFinite(durationMs)) this.placeholderDuration = durationMs / 1000;
108108
}
109109

110110
/**

0 commit comments

Comments
 (0)