#4094 - Switched back to multiple audio player instances (1 per event identifier), strongly retaining the currenty playing one and unloading all stopped ones. Various other improvements and bug fixes.

This commit is contained in:
Stefan Ceriu
2021-07-14 10:26:21 +03:00
parent f0363d2867
commit e1c77b1775
5 changed files with 111 additions and 48 deletions
@@ -99,6 +99,11 @@ class VoiceMessageAudioPlayer: NSObject {
addObservers()
}
func unloadContent() {
url = nil
audioPlayer?.replaceCurrentItem(with: nil)
}
func play() {
isStopped = false