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

Commit

Permalink
Merge pull request #6435 from matrix-org/travis/voice-messages/duration
Browse files Browse the repository at this point in the history
Fix duration placeholder parsing for audio files
  • Loading branch information
turt2live authored Jul 22, 2021
2 parents 0bb0c81 + 2addca1 commit b3d14de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/voice/PlaybackClock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit b3d14de

Please sign in to comment.