mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Fix: the duration of voice messages is now expressed in milliseconds (#1904)
This commit is contained in:
parent
20143cb84e
commit
39e3328b02
@ -127,7 +127,7 @@ class AudioPlayer: NSObject, AudioPlayerProtocol {
|
||||
func seek(to progress: Double) async {
|
||||
guard let internalAudioPlayer else { return }
|
||||
let time = progress * duration
|
||||
await internalAudioPlayer.seek(to: CMTime(seconds: time, preferredTimescale: 60000))
|
||||
await internalAudioPlayer.seek(to: CMTime(seconds: time, preferredTimescale: 60))
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
@ -475,7 +475,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
}
|
||||
|
||||
return AudioRoomTimelineItemContent(body: messageContent.body,
|
||||
duration: (messageContent.audio?.duration ?? 0) / 1000.0,
|
||||
duration: messageContent.audio?.duration ?? 0,
|
||||
waveform: waveform,
|
||||
source: MediaSourceProxy(source: messageContent.source, mimeType: messageContent.info?.mimetype),
|
||||
contentType: UTType(mimeType: messageContent.info?.mimetype, fallbackFilename: messageContent.body))
|
||||
|
Loading…
x
Reference in New Issue
Block a user