Skip to content

Commit

Permalink
Update LoopingPlayerProtocol.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
swiftuiux committed Aug 14, 2024
1 parent 44d3c50 commit d48dc08
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,13 @@ internal extension LoopingPlayerProtocol {
let wasPlaying = player.rate != 0

if wasPlaying {
player.pause()
pause()
}

// Cleaning
unloop()
clearPlayerQueue()
removeAllFilters()


// Replace the current item
let newItem = AVPlayerItem(asset: asset)
Expand Down Expand Up @@ -215,9 +214,10 @@ internal extension LoopingPlayerProtocol {
removeAllFilters()

player = nil
delegate = nil

#if DEBUG
print("Cleaned up AVPlayer and observers.") // Debug log for confirming cleanup.
print("Cleaned up Player!")
#endif
}

Expand Down

0 comments on commit d48dc08

Please sign in to comment.