We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cea0856 commit 5ce9ee1Copy full SHA for 5ce9ee1
1 file changed
Sources/BasicAudioPlayer/BAPlayer/BAPlayer.swift
@@ -223,11 +223,9 @@ public class BAPlayer {
223
}
224
225
// MARK: - Handling Events
226
-
+
227
/// Adds an action to perform when the player status changes.
228
- ///
229
- /// Only the last action added through this method will be evoked when the status changes.
230
- public func onStatusChange(perform action: @escaping (Status) -> Void) {
+ public func onStatusChange(perform action: ((Status) -> Void)? = nil) {
231
onStatusChangeHandler = action
232
233
0 commit comments