its now in safe view (#67)

* bug fixes + optimization buffer indicator

* snappier pause unpause buttons (animations are the same)

* buffer indicator and bar fixes

* player optmizations

* beautiful title text in the player

* brightness slider in safe view
This commit is contained in:
Seiike 2025-04-07 16:12:20 +02:00 committed by GitHub
parent 1f3ea9c267
commit ec3507a16b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -496,19 +496,19 @@ class CustomMediaPlayerViewController: UIViewController {
fillColor: .white.opacity(0.5),
emptyColor: .white.opacity(0.3),
width: 22,
onEditingChanged: { editing in
}
onEditingChanged: { editing in }
)
// Create the container for the brightness slider
let brightnessContainer = UIView()
brightnessContainer.translatesAutoresizingMaskIntoConstraints = false
brightnessContainer.backgroundColor = .clear
controlsContainerView.addSubview(brightnessContainer)
// Add the container to the main view and anchor it to the safe area.
view.addSubview(brightnessContainer)
NSLayoutConstraint.activate([
brightnessContainer.leadingAnchor.constraint(equalTo: controlsContainerView.leadingAnchor, constant: -4),
brightnessContainer.centerYAnchor.constraint(equalTo: controlsContainerView.centerYAnchor, constant: -10),
brightnessContainer.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 16),
brightnessContainer.centerYAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerYAnchor),
brightnessContainer.widthAnchor.constraint(equalToConstant: 22),
brightnessContainer.heightAnchor.constraint(equalToConstant: 170)
])
@ -527,6 +527,7 @@ class CustomMediaPlayerViewController: UIViewController {
brightnessSliderView.trailingAnchor.constraint(equalTo: brightnessContainer.trailingAnchor)
])
}
func addInvisibleControlOverlays() {
let playPauseOverlay = UIButton(type: .custom)