This seems to be a device specific bug on only iPhone 6S Plus.
Steps:
AVPlayerDemoPlaybackView.xib
so that MPlayback View
has margins around it1px 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!
Setting the AVPlayerLayer
's shouldRasterize
property to true
makes the borders disappear.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With