Reputation: 862
Is there a way to have an (one single) AVPlayerLayer cover the area as shown in the image below?
The player should cover both the white and red area with the appropriate perspective.
Upvotes: 1
Views: 528
Reputation: 96333
You definitely can't do this with one layer with an affine transform. Maybe with Core Image, but I don't know what filter(s) you'd use and they'd probably be really expensive anyway.
What you might be able to do is use multiple AVPlayerLayers, each playing the same item, with their 3D transforms set so that they intersect at the fold point. The left side of the right layer would be behind the left layer, and the right side of the left layer would be behind the right layer.
playerItem
from one and create a second AVPlayer around it.As you can guess, I haven't done this, so caveat implementor. Hopefully it'll set you in the right direction.
Upvotes: 1