From 607e8a9677e66239f6b2afe5908aeb7b3d13b15d Mon Sep 17 00:00:00 2001 From: Seiike <122684677+Seeike@users.noreply.github.com> Date: Sat, 22 Mar 2025 13:24:12 +0100 Subject: [PATCH] =?UTF-8?q?problem=20solved=20=F0=9F=8E=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift b/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift index cb8cfdb..1acb788 100644 --- a/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift +++ b/Sora/Utils/MediaPlayer/CustomPlayer/CustomPlayer.swift @@ -145,8 +145,8 @@ class CustomMediaPlayerViewController: UIViewController { setupSubtitleLabel() setupDismissButton() setupQualityButton() - setupMenuButton() setupSpeedButton() + setupMenuButton() setupSkip85Button() setupWatchNextButton() addTimeObserver() @@ -540,7 +540,7 @@ class CustomMediaPlayerViewController: UIViewController { NSLayoutConstraint.activate([ menuButton.topAnchor.constraint(equalTo: controlsContainerView.topAnchor, constant: 20), - menuButton.trailingAnchor.constraint(equalTo: qualityButton.leadingAnchor, constant: -20), + menuButton.trailingAnchor.constraint(equalTo: speedButton.leadingAnchor, constant: -20), menuButton.widthAnchor.constraint(equalToConstant: 40), menuButton.heightAnchor.constraint(equalToConstant: 40) ]) @@ -550,17 +550,16 @@ class CustomMediaPlayerViewController: UIViewController { speedButton = UIButton(type: .system) speedButton.setImage(UIImage(systemName: "speedometer"), for: .normal) speedButton.tintColor = .white - speedButton.showsMenuAsPrimaryAction = true - speedButton.menu = speedChangerMenu() // If you want the speed menu + speedButton.menu = speedChangerMenu() controlsContainerView.addSubview(speedButton) speedButton.translatesAutoresizingMaskIntoConstraints = false - // Pin it at the top, to the left of the subtitles (menu) button. NSLayoutConstraint.activate([ + // Middle speedButton.topAnchor.constraint(equalTo: controlsContainerView.topAnchor, constant: 20), - speedButton.trailingAnchor.constraint(equalTo: menuButton.leadingAnchor, constant: -20), + speedButton.trailingAnchor.constraint(equalTo: qualityButton.leadingAnchor, constant: -20), speedButton.widthAnchor.constraint(equalToConstant: 40), speedButton.heightAnchor.constraint(equalToConstant: 40) ])