Autoplay the next voice message if it is the next timeline item. (#6089)

This commit is contained in:
Mauro
2026-09-01 18:00:14 +02:00
committed by GitHub
parent b4a36ad465
commit 86bc4d54b6
13 changed files with 463 additions and 16 deletions
@@ -8,6 +8,17 @@
import Foundation
enum SoundEffect {
/// A short, light blip.
case tink
var fileURL: URL {
switch self {
case .tink: URL.systemSoundsDirectory.appending(component: "Tink.caf")
}
}
}
protocol MediaPlayerProviderProtocol {
var player: AudioPlayerProtocol { get }
@@ -15,6 +26,10 @@ protocol MediaPlayerProviderProtocol {
func register(audioPlayerState: AudioPlayerState)
func unregister(audioPlayerState: AudioPlayerState)
func detachAllStates(except exception: AudioPlayerState?) async
/// Plays a short sound on top of whatever is already playing. It goes through the app's own
/// audio session, so unlike the sounds built into iOS it is heard in silent mode too.
func play(soundEffect: SoundEffect)
}
// sourcery: AutoMockable