如您所见,我想在画中画上隐藏这三个按钮,有什么解决办法吗?
这是我的点子代码:
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!
}()