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