diff --git a/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift b/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift index 997012f..52ec730 100644 --- a/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift +++ b/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift @@ -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 { diff --git a/Sora/Views/MediaInfoView/MediaInfoView.swift b/Sora/Views/MediaInfoView/MediaInfoView.swift index 92a59ce..f08ea59 100644 --- a/Sora/Views/MediaInfoView/MediaInfoView.swift +++ b/Sora/Views/MediaInfoView/MediaInfoView.swift @@ -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()