Play videos from iPad with out import into my app - ios

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

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).

Related

how to create url of image inside the app using swift

I hv a small app which shows iPhones videos and images in the app.
Now when I access any photo or video, I want to generate its http url using GCDWebServer (e.g. http://my-device.local/photo-12-2019.jpg)
I came across this link (https://github.com/swisspol/GCDWebServer)
which to some extent clears concept but not sure how to exactly convert photo or video to url.
I want to expose url to GCDWebServer on my iPhone.
Any sample code or reference would be good.
Thanks

Application that plays videos from the video library

I would like to create a simple app that does some video playback (with a few extra controls) of videos that you would find in the videos app. I've been searching and searching for a way to access the videos but I haven't found a single API that plays from the videos app.
Every solution I find plays videos from the photos app. I have apps that access the videos library on my iPad/iPhone so I'm assuming it's possible. Does anyone have the api for this?
Apps cannot access data from other applications on iOS, you cannot access the data of other apps unless it's made available by the app via a web server etc.
Your best bet is to use UIImagePicker to load the videos and images that are on your phone.
You can check out a reference here.
As for getting the videos off the videos app, that's not really possible (as far as I know), but you are able to show just photos or just videos with UIImagePicker using the mediaTypes property.

Filter the contents of the Photo Gallery from my app

I have an application that will take care of recording video using UIImagePickerController object and videos are saved in the shared library of IOS.
I have only one problem.
If you record video from an external application to my application, unfortunately I can see both the videos recorded with my application is the video recorded by the other application.
Is there a way to make the filter of assets not recorded with my application?
Thank you,
Vincenzo
Save video to apps document folder and while using, pick it from the same location.
Refer this link to save video in documents folder.
But your other apps are unable to access those and deleting app deletes captured videos too.

using NSURL class refrence to view videos in my app from video app

I have videos in my ipads local video library. When I click a video in the app I created, the video opens in the local video library not in the app. Does anyone know how i can get the videos to play in the app from the local video library? using NSURL class reference
I've spoken to most of the developers I know & they tell me its not possible. I feel like if there's a will there's a way with a little help :)

How to save youtube videos with UISaveVideoAtPathToSavedPhotosAlbum?

I am able to save the local video (which I have copied to code) to my
Photo Album with the help of UISaveVideoAtPathToSavedPhotosAlbum.
I want to save the you tube video into the Photo album. Is it possible?
Thanks in advance.
Unfortunately, you can't save YouTube videos locally because of 2 main reasons:
YouTube do not allow users to download videos to local devices.
There is no appropriate API in iOS for this.

Resources