hyperoslo / Lightbox

:milky_way: A convenient and easy to use image viewer for your iOS app
https://www.hyper.no
Other
1.62k stars 326 forks source link

Playing local videos not working. #277

Open berildoguc opened 3 years ago

berildoguc commented 3 years ago

Hi, I want to play local videos which fetched from assets. Here is my code :

manager.requestAVAsset(forVideo: media, options: videoOption, resultHandler: { (asset, audioMix, info) in if let urlAsset = asset as? AVURLAsset { let localVideoUrl = urlAsset.url images.append(LightboxImage(image: UIImage(named: "play2")!, text: "", videoURL: localVideoUrl)) } })

But screen is empty. Anyone can help me, please? Simulator Screen Shot - iPhone 8 - 2021-05-26 at 23 54 53