Video played with AVPlayer has grey line to top and sides on iPhone 6S Plus

后端 未结 6 753
攒了一身酷
攒了一身酷 2021-01-04 05:02

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

Steps:

  1. Download AVPlayer demo sample code
  2. Adjust AVPlaye
6条回答
  •  独厮守ぢ
    2021-01-04 05:58

    My suggestion would be that since your use case is an animated loop to ditch the AVPlayer and use a UIImageView.

    UIImage has animatedImage(with:duration:) where you can input an array of images and animate them how you like.

    I think this would solve your problem. In my experience AVPlayer has been a little wonky with iOS 10. I think that since you are only seeing this problem on the 6s+ and 7s+ is proof that it has some issues.

    If you are absolutely committed to figuring out the AVPlayer, first submit a bug report to Apple. Then maybe try adding a UIImageView behind your AVPlayer that has the image set to a blank frame from your video. This is kind of a hacky solution, but it might work. Additionally, check out this stack overflow post. It might shed some light on the issues you are having with the AVPlayer.

    Best of luck.

提交回复
热议问题