使用AVPlayer播放的视频在iPhone 6S Plus的顶部和侧面都有灰线 [英] Video played with AVPlayer has grey line to top and sides on iPhone 6S Plus

查看:106
本文介绍了使用AVPlayer播放的视频在iPhone 6S Plus的顶部和侧面都有灰线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是仅在 iPhone 6S Plus 上特定于设备的错误.

This seems to be a device specific bug on only iPhone 6S Plus.

步骤:

  1. 下载 AVPlayer演示示例代码
  2. 调整AVPlayerDemoPlaybackView.xib,以使MPlayback View周围有边距
  3. 使内容视图颜色为白色
  1. Download AVPlayer demo sample code
  2. Adjust AVPlayerDemoPlaybackView.xib so that MPlayback View has margins around it
  3. Make content view color white

1px灰线将出现在顶部和侧面.

1px grey lines will appear at the top and sides.

有人知道如何解决此问题吗?

Anyone knows how to workaround this?

我尝试放置一个使顶部模糊的不透明视图,但该行仍将出现在不透明视图之上!

I have tried to put an opaque view that obscure the top, yet the line will still appear ABOVE the opaque view!

推荐答案

设置AVPlayerLayertrue的="noreferrer"> shouldRasterize 属性会使边框消失.

Setting the AVPlayerLayer's shouldRasterize property to true makes the borders disappear.

这篇关于使用AVPlayer播放的视频在iPhone 6S Plus的顶部和侧面都有灰线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆