#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 513c950e0d
commit bcba0d2338
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