I am working on a video editing app where each video gets squared in such a way that no portion of the video gets cropped.For this, in case of portrait video, it contains black portion on left & right and for landscape video, it contains black portion on top & bottom side of the video. Black portions are part of the video, they are not for AVPlayerViewController
. Here is the sample,
I need to cover these black portions with some CALayers
.
What will be the frame(CGRect) of the
CALayer
?
I am getting the video dimension with naturalSize
property which includes the black portions.
Is there any way to get the video dimension without the black portions?(I mean the dimension of actual video content) or is there any way to get the
CGRect
of black area of the video?