我想将默认背景颜色从黑色更改为我想要的颜色。可能与视频形成对比的颜色(大部分时间是黑色的)。
我在我的 viewWillAppear()
函数中添加了这段代码:
let playerLayer = AVPlayerLayer(player: player)
playerLayer.backgroundColor = UIColor.blueColor().CGColor
最佳答案
背景的黑色是 AVPlayerView - Controller View 的背景颜色,您可以自由更改。
例如:
let av = AVPlayerViewController()
av.view.backgroundColor = UIColor.whiteColor()
关于ios - 是否可以更改 AVPlayer 的背景颜色?如果是,如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37204758/