ohhhh yeah my bad

This commit is contained in:
Francesco 2025-06-04 20:19:12 +02:00
parent 26957de534
commit 491716b1e2
2 changed files with 1 additions and 27 deletions

View file

@ -422,13 +422,6 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
player.removeTimeObserver(token)
}
if let backgroundToken = backgroundToken {
NotificationCenter.default.removeObserver(backgroundToken)
}
if let foregroundToken = foregroundToken {
NotificationCenter.default.removeObserver(foregroundToken)
}
player.pause()
}
@ -1793,25 +1786,6 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
updateSkipButtonsVisibility()
}
}
func handleEnterBackground() {
wasPlayingBeforeBackground = player.rate > 0
if isPipAutoEnabled && AVPictureInPictureController.isPictureInPictureSupported() {
startPipIfNeeded()
} else {
player.pause()
}
}
private func handleBecomeActive() {
if wasPlayingBeforeBackground &&
!(pipController?.isPictureInPictureActive ?? false) {
player.play()
player.rate = currentPlaybackSpeed
isPlaying = true
playPauseButton.image = UIImage(systemName: "pause.fill")
}
}
@objc private func skipIntro() {
if let range = skipIntervals.op {

View file

@ -586,7 +586,7 @@ struct MediaInfoView: View {
ZStack(alignment: .leading) {
RoundedRectangle(cornerRadius: 25)
.fill(Color.accentColor.opacity(0.25))
.frame(width: width, height: 48)
.frame(height: 48)
Button(action: {
playFirstUnwatchedEpisode()