Use the iPad's Camera for Stream in Localhost - swift

On my Mac Book Pro, I have a MAMP server.
Address: http://localhost:8888
I create a simple page with a video tag:
On my iPad Pro, I created an application that uses the camera of the iPad.
I would like to know how to send the video from the iPad's camera to my localhost server (on the video tag).
I have no idea how to do this.
Can you help me?
Thank you so much
Note: The iPad and the MacBook are not connected by a cable.
The iPad and MacBook are in 2 different rooms.

The issue with apple is the video format which can be streamed are not supported by other browsers (m3u8 format) which cannot be viewed in chrome / mozilla only works in safari browsers. so the solution for this is to capture images from iPad (frame extractor)
Below link will help to do it
https://medium.com/ios-os-x-development/ios-camera-frames-extraction-d2c0f80ed05a
after extracting the images send this images to the localhost in the form of MJPEG format. and you can view this in you browser player.
Make sure you use GCD and Autorelease pool or while sending the images the iPad UI may freeze as it is a heavy task to extract and send it to server at the same time.
Hope this helps.

Related

Capture screen of UBS-connected iPhone in macOS App

TL;DR: Can I capture an iPhone's screen from my macOS application?
I've been searching for any APIs on macOS to to capture the screen of an iPhone that's connected to the computer, but haven't found any. Are there such public API's?
I've looked at SonOfGrab-example from apple, but that's only for processes running on the "current" computer from what I can figure out.
I want to do what QuickTime does when it records from the device, however I want to do it programmatically, by getting the image or a video stream of what's showing on the iPhone.

iOS video not playing in mobile safari

I have this really annoying problem that I cannot seem to solve.
We have some short clips on our server that we are trying to view via mobile safari. The weird thing is that we are able to view the movie on mobile safari when our iPhones are on 3g, and not when we are on WiFi.
It gets weirder that we are able to view the movie sometimes on wifi and not other times.
Here is the link in question:
http://bit.ly/Za0xBA
Why would the link play via 3g and not via wifi? Are there some settings in there that would be stopping? We even tried to wireshark the connection via the iOS simulator and what was going on and it looks like the video is downloading fine.
This is driving us nuts!

iphone send video to ipad live streaming and wireless control (like AR Drone)

How can I send video from an iPhone to an iPad?
I'm building a robot that is an iPhone controlling an arduino, for the next phase I would like to be able to send some live streaming video from the iPhone to see in an iPad and have the iPad sending commands to the iPhone.
so how to send live streaming video from one device to the other (WiFi preferred or BlueTooth), and how to control one device via wireless from the other?
EDIT:
The best example for what I intend to do is the Parrot AR Drone and another app for the toy,
app clone to pilot the Quadracopter
The difference is that I would be getting the image from an iPhone and sending the control orders to the iPhone [from an iPad] as well, not a separate hardware.
Thanks a lot!
Most of the apps I've seen that do this use AVFoundation to capture data form the video camera - then push the frames to a server somewhere. You probably won't want to push every frame. For the receiving side of things I would have a server hosting a web page with an html5 video tag looking at an m3u8 playlist. Have your files from the iphone go into the playlist folder.
<video src="http://yourserver.com/path/to/stream/yourPlaylist.m3u8">
Your browser does not support the VIDEO tag
</video>
Then set your view on the ipad or computer to look at that webpage. There is for sure a more direct way of sending the files straight to the ipad for viewing - but I like being able to view the video from any broswer :)
If you want to stay away from a web view on the ipad you can also get the files as you would retrieve any file over a network. The web view is just the easiest way in my opinion.
How to integrate Live555 in XCode (iOS SDK)
hope this helps!

How to connect the camera from iphone to mac

I need to know if there is a way to connect the camera of iPhone to mac. My aim is like to create a spying camera where iPhone will act as the spying device and we will see the view from its camera on mac screen.
There is no API for this. The "answer" is to build a client and then capture the images on the iPhone screen and transmit them to the client server.

mp4 stream to iphone/ipod touch via http

is it possible to stream video to iphone/ipod touch over http without a proper streaming server with .net? may be some sort of progressive download?
The best way that I suggest is to use HTML 5. The iDevices (iPhone/iPod Touch/iPad) doesn't support Silverlight or Flash.
I think the mobile devices you are trying to watch the videos from have a 'video size limit' because when i test my website i test everything over wifi for real world scenarios and when i reach a certain video size i am not able to watch the video on that mobile device. videos under 1gb work great, but when i try watching a 2.5gb HD video it will not open the video on my ipod/ipad/iphone/android devices....