如你所见,我想隐藏这三个按钮的图片中的图片,有什么办法吗?
下面是我的pip代码:
private lazy var playerLayer: AVPlayerLayer = {
let layer = AVPlayerLayer()
let mp4Video = Bundle.main.url(forResource: "v1", withExtension: "MP4")
let asset = AVAsset.init(url: mp4Video!)
let playerItem = AVPlayerItem.init(asset: asset)
let player = AVPlayer.init(playerItem: playerItem)
layer.player = player
player.isMuted = true
player.allowsExternalPlayback = false
return layer
}()
private lazy var pipVC: AVPictureInPictureController = {
let vc = AVPictureInPictureController.init(playerLayer: playerLayer)
vc?.delegate = self
return vc!
}()
2条答案
按热度按时间xfyts7mz1#
您至少可以通过以下方式隐藏搜索按钮:
其中,vc是您的AVPictureInPictureController示例。
如果你已经找到了隐藏播放按钮的方法,请分享它。
kmpatx3s2#