Question

In my app I want to play already saved videos from user's iPad. normally we use UIimagePickercontroller for import assets in our apps. but in my case i want to play video file without importing or saving in my app. i already check the UIImagePickerControllerMediaURL which shows path of y app it means fail is planing from temporary folder file:///private/var/mobile/Applications/137E6A4A-3777-4926-8D52-434C2E3EDC0C/tmp/trim.4BAC5E82-D175-4ABD-BC9A-E3A8FF0D5551.MOV

I found some links witch are help you guys to understand display image from URL retrieved from ALAsset in iPhone

play video from URL retrieved from ALAsset in iOS

Was it helpful?

Solution

but in my case i want to play video file without importing or saving in my app

To achieve this, you have to know the ALAsset url of the desired video. Use ALAssetLibrary to load the video using ALAsset url.

You can display all the Photolibrary videos using UIimagePickercontroller and you can get the url of the video's when user choosing one from this. Save those url to your application storage and play it again while you need (using ALAsset and saved ALAsset url).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top