We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func tracks(withMediaType mediaType: AVMediaType) -> [AVAssetTrack]
pod 'ZLPhotoBrowser', '4.5.6' Xcode Version 15.4 (15F31d) Device: e.g. iPhone 13 Pro Max Device version: e.g. iOS 18.1
ZLPhotoConfiguration
item.asset.tracks(withMediaType: .video).first 这个代码卡顿。
item.asset.tracks(withMediaType: .video).first
private func calculatePlayerFrame(for item: AVPlayerItem) -> CGRect { if let videoTrack = item.asset.tracks(withMediaType: .video).first { let size = videoTrack.naturalSize.applying(videoTrack.preferredTransform) let videoWHRatio = size.width / size.height let cellWHRatio = zl.width / zl.height let videoRect: CGRect if videoWHRatio > cellWHRatio { let videoH = zl.width / videoWHRatio videoRect = CGRect(x: 0, y: (zl.height - videoH) / 2, width: zl.width, height: videoH) } else { let videoW = zl.height * videoWHRatio videoRect = CGRect(x: (zl.width - videoW) / 2, y: 0, width: videoW, height: zl.height) } return videoRect } else { return bounds } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
tracks(withMediaType mediaType: AVMediaType) 函数卡顿。(iOS15后不建议已使用)
Description and Steps
Info
pod 'ZLPhotoBrowser', '4.5.6'
Xcode Version 15.4 (15F31d)
Device: e.g. iPhone 13 Pro Max
Device version: e.g. iOS 18.1
Configuration code of
ZLPhotoConfiguration
item.asset.tracks(withMediaType: .video).first
这个代码卡顿。The text was updated successfully, but these errors were encountered: