FSPagerView
FSPagerView copied to clipboard
How to slide videos?
Hi, Is there any way to slide videos by this framework? I couldn't find any options to add videos . Help me!
try creating thumbnail from video
func generateThumbnailFromVideo(path: URL) -> UIImage? { do { let asset = AVURLAsset(url: path, options: nil) let imgGenerator = AVAssetImageGenerator(asset: asset) imgGenerator.appliesPreferredTrackTransform = true let cgImage = try imgGenerator.copyCGImage(at: CMTimeMake(value: 0, timescale: 1), actualTime: nil) let thumbnail = UIImage(cgImage: cgImage)
return thumbnail
} catch let error {
print("*** Error generating thumbnail: \(error.localizedDescription)")
return nil
}
}