how to create url of image inside the app using swift - ios

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

Related

Vuforia display video that was downloaded from the internet

I need to develop an app, that uses Vuforia cloud recognition of object, and then display a video on top of that object. This video file needs to be downloaded from the internet from separate web service, using recognized object identifier. I was looking at Vuforia samples, and was able to configure Cloud Recognition to use correct target manager database - objects are recognized correctly. But I don't know how to do, so that after discovering this object, I would display an loader view, and when video is ready to play, then display this video. I don't know where and what to update in the code. I only found that some local dataset can be used, but I can't use local dataset, because videos I want to display, are supposed to be downloaded from the internet after detection. Can someone direct me, where in Vuforia examples I can update what is shown on the target?
Vuforia cloud is only for markers.
As per your requirements
1. You need to use iOS code to download the video.
2. After that you have to show that video using AVPlayer.

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.

What solution should I use for a backend of an iOS app to store and stream video (like Instagram for example)?

I'm working on an app that will record video and upload it on a server.
The app shoud also to be able to stream this video.
I don't know what backend solution I should use to do it.
I looked at Azure Media but it's to great.
Thank you for your help

UIActivityViewController - Upload Youtube Video

I have a UIActivityViewController I'm using to share a video, I'm passing an NSString of text and a NSUrl that points to a local mp4 video file.
Sharing already works for email, message, photo album, etc. How can I upload my video to Youtube as well?
Apple does this in the default Photos and Camera app if you try it there. Can I do it in my app as well?
Apple only share some of the UIActivity that it uses in it's applications. That's likely because some are part of iOS while other are parts of the applications (different teams).
OTOH it's quite easy to add your own UIActivity to your application, e.g. see my AirPlay UIActivity that comes with a sample.
So if you can find a .NET YouTube client library then you should only need a bit of glue to connect them.
Unfortunately, as per UIActivity class reference it is not included in iOS 6 (well, at least not in the public API).
You'll probably have to create your own UIActivity (just like here) and implement the youtube upload yourself.
Or hopefully there is a ready-made library that does so.

Sharing a video link on facebook ios

I'm trying to share a link of a video that I uploaded in my website host. But the post doesn't show my video and a thumbnail image. I want my post to look like this image bellow:
http://i.stack.imgur.com/UcbTG.png
is there anyway to post my video like that?
I'm using facebook SDK 3.1.1, ARC, Cocos2d 2.0, IOS 5.1;
Yes, if you supply the correct Open Graph Tags as per https://developers.facebook.com/docs/opengraphprotocol/#audiovideo your video can embed in the News Feed post.
To accomplish the actual Sharing, you should use the Feed Dialog which is customizable and will work on desktop and mobile devices.

Resources