mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Autoplay the next voice message if it is the next timeline item. (#6089)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user