标签: ios iphone avfoundation avplayer
AVCaptureVideoPreviewLayer具有方法metadataOutputRectOfInterestForRect,该方法可以计算摄像头视图的可见部分(在图层上)的矩形考虑视频重力。
AVCaptureVideoPreviewLayer
metadataOutputRectOfInterestForRect
如何为AVPlayerLayer完成此操作?
AVPlayerLayer
答案 0 :(得分:0)
如何复制AVPlayer的fitIn的数学运算?
您可以在其后面获得AVAset
您拥有视图的大小
visibileRect = CGRectDoFitIn(assetFrame viewFrame)