Voice message: variable play back speed (#5121)
* Implement voice message variable playback speed * Move playback speed string to Untranslated https://github.com/element-hq/element-x-ios/pull/5121#discussion_r2822631371 * Address review feedback for voice message playback speed - Persist voice message playback speed as an enum in AppSettings instead of storing an index. - Update playback speed cycling to derive from enum allCases and safely fall back to `.default` if the stored value cannot be resolved. - Apply runtime speed updates in AudioPlayer only when the player is in the `.playing` state. - Keep MediaPlayerProviderTests formatting/indentation style intact while retaining mock playback speed setup. - Regenerate preview snapshots for: - PlaybackSpeedButton - VoiceMessageRoomPlaybackView - VoiceMessageRoomTimelineView * Move VoiceMessagePlaybackSpeed outside AppSettings, remove speedRatio * Stabilize PlaybackSpeedButton width * Sync voice-message speed label - Add voiceMessagePlaybackSpeed to TimelineViewState and bind it from appSettings.$voiceMessagePlaybackSpeed. - Pass that timeline-level speed into VoiceMessageRoomPlaybackView and use it for PlaybackSpeedButton, so labels update consistently across items. - Use @EnvironmentObject in VoiceMessageRoomTimelineContent so the view re-renders when timeline context state changes. - In WaveformInteractionModifier, add .allowsHitTesting(showCursor) to the cursor interaction view so hidden pre-playback cursor hit area does not steal taps from the speed button.
This commit is contained in:
@@ -718,6 +718,13 @@ extension PreviewTests {
|
||||
}
|
||||
}
|
||||
|
||||
func testPlaybackSpeedButton() async throws {
|
||||
AppSettings.resetAllSettings() // Ensure this test's previews start with fresh settings.
|
||||
for (index, preview) in PlaybackSpeedButton_Previews._allPreviews.enumerated() {
|
||||
try await assertSnapshots(matching: preview, step: index)
|
||||
}
|
||||
}
|
||||
|
||||
func testPollFormScreen() async throws {
|
||||
AppSettings.resetAllSettings() // Ensure this test's previews start with fresh settings.
|
||||
for (index, preview) in PollFormScreen_Previews._allPreviews.enumerated() {
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7473df382774c7badd74735d39bd84d4669172870eb2013b5549f3c31714aef3
|
||||
size 71249
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7473df382774c7badd74735d39bd84d4669172870eb2013b5549f3c31714aef3
|
||||
size 71249
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:567bc2d7980ce4abb548c1851b7a1600b5a4da86a13a90006c0359c378f37ba4
|
||||
size 30008
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:567bc2d7980ce4abb548c1851b7a1600b5a4da86a13a90006c0359c378f37ba4
|
||||
size 30008
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2bae7bf388a08eea2c5e13c0ef6d0c51858dc9f46dcf5cca5b7dc79f6270410f
|
||||
size 71827
|
||||
oid sha256:15ce484f5c7dfcbd8c5f226c11962e5a0cc51f67e38f04f61879c7dbd41a1a78
|
||||
size 72637
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2bae7bf388a08eea2c5e13c0ef6d0c51858dc9f46dcf5cca5b7dc79f6270410f
|
||||
size 71827
|
||||
oid sha256:15ce484f5c7dfcbd8c5f226c11962e5a0cc51f67e38f04f61879c7dbd41a1a78
|
||||
size 72637
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bc034b48c12a30db34d74e7b105886ce33ed9d37b7ebd97bd59f070d2af806b6
|
||||
size 30299
|
||||
oid sha256:09fef09be6c353e64124f0f8044140ffca8bab8f3ae542445b4b6d0a2dd78b5f
|
||||
size 30861
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bc034b48c12a30db34d74e7b105886ce33ed9d37b7ebd97bd59f070d2af806b6
|
||||
size 30299
|
||||
oid sha256:09fef09be6c353e64124f0f8044140ffca8bab8f3ae542445b4b6d0a2dd78b5f
|
||||
size 30861
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f518c5ce36c085ec697501297d0303044042b8df1341fcf0d02b08b3eef58959
|
||||
size 77812
|
||||
oid sha256:6b2ceba201b14a637977eb6b0f7b15ac119138402a9e502da002305ddce95bc0
|
||||
size 78972
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3d456a81d249a01c6817c0bb35bf2a501ca641918009533c3a8dbb9db2739456
|
||||
size 78571
|
||||
oid sha256:6b2ceba201b14a637977eb6b0f7b15ac119138402a9e502da002305ddce95bc0
|
||||
size 78972
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cef3e1dc07041a0624fe8f900b36c61962dc6d0f956fc532deb3262853448c10
|
||||
size 36670
|
||||
oid sha256:65d7f7c53532549016386f37ea663fd7cce7f2827db931892622de94c6bff980
|
||||
size 37285
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:abf4ef40082a65fa07969637dfdaf2b218953fa45281a7b0d62dd532889c9e44
|
||||
size 37417
|
||||
oid sha256:65d7f7c53532549016386f37ea663fd7cce7f2827db931892622de94c6bff980
|
||||
size 37285
|
||||
|
||||
Reference in New Issue
Block a user