andreamazz / andreamazz/SubtleVolume

MPVolume Hud doesn't disappear with AVPlayerViewController

Đang mở
#24 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Swift
Star
1.2k
Fork
63
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I have a UIViewController with an AVPlayerViewController in it. I disable MPVolume Hud in the ViewController, and it doesn't appear until I play the AVPlayer in the AVPlayerViewController. I know that with

`avplayercontroller.showsPlaybackControls = false`

the hud disappears, but the problem is that every control disappears, and I need controls, and I prefer to use system controls instead of custom ones.

SubtleVolume works, but when I play the Player controller both the hud and SubtleVolume are visible.

I tried to create a MPVolume and add it to the app window, to the player controller view, but the hud is still visible.

```swift
let volumeView = MPVolumeView(frame: CGRect.zero)
if let appDelegate = UIApplication.shared.delegate as? AppDelegate, let window = appDelegate.window {
window.insertSubview(volumeView, at: 0)
}
```

I've tried almost everything, but I can't figure out what is the problem.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.