andreamazz / andreamazz/SubtleVolume

MPVolume Hud doesn't disappear with AVPlayerViewController

未关闭
#24 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Swift
星标
1.2k
派生
63
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。