how can I play a video by file path (saved in photo gallery) using AVPlayer or MPMoviePlayer? - xamarin.ios

104 Views Asked by At

Actually, I am capturing video using AVCaptureSession+AVCaptureMovieFileOutput and then storing file path in SQLite. Now I want to play recorded video using that file path. so, my question is how can I play a video by file path (saved in photo gallery) using AVPlayer or MPMoviePlayer? I am working in xamarin.ios

1

There are 1 best solutions below

0
Cheesebaron On

You will need to use PhotoKit to first request access to the photo gallery, then you can query and get a PHAssetCollection with the images/live images/videos you are interested in.

With a PHAsset in your hand you can use PHImageManager to request a AVAsset to display in your video player.