Is there any way to have a web page record sound from an iPad? - ipad

I don't think this is currently possible with straight HTML (although I've heard that HTML5 may support this in the future):
I'd like a web app that can record audio from the iPad (and also, ideally iPhone).
This will not be an iOS app. It's a web page.

Unfortunately, no. The only hardware functions you can get access to via HTML/JS are the location service and the accelerometer.

Related

iOS App that controls the screen also when backgrounded

Is there any way to implement an iOS app that has access to the screen (e.g. screen recording) also when it's backgrounded? Has anyone experience with this?
Apps like TeamViewer do this, but it's not clear to me if they went through a special process with Apple (e.g. a non-open API).
P.S. I am of course assuming that the user would have to explicitly accept this (e.g. like for system extensions on macOS), the goal here is not to make a malicious app but a remote-control tool.
The only way to record the screen in the background is by using the broadcast upload extension in ReplayKit 2. This WWDC talk goes into more detail around how to use this API https://developer.apple.com/videos/play/wwdc2018/601/
Since it's not specifically designed for your use case you will have to do some things differently like locally storing the frames in your App Group instead of uploading them.

Record audio in mobile Safari

I need to create an iOS app that just displays a website. The site allows users to record audio. The purpose is to let mobile Safari users to record audio (which is currently not supported). Are there any decent solutions for this or am I going to have to hack my way through? So far I have the following two ideas:
1) Build a native application that contains a WKWebView of the site. If the website detects mobile Safari it will launch some JavaScript that the app can respond to (or it will try to bring the user to the App Store using Universal Links). The native app will then record the audio and send it back to the website somehow (either through an external server, or perhaps through JavaScript, not sure how much data can be passed, but it could be up to 1MB).
2) Use an existing solution using perhaps Cordova/PhoneGap.
Hope to get some tips!
Build an hybrid application based on cordova/PhoneGap seems to be the best in my opinion. In addition you can build for iOS and Android (if you need later).
You can easily use this plugin to achieve your app.

can ios safari access bluetooth device?

I'm working on a location related project. I found that iOS has iBeacon which can help the app to get the location data. I want to know if iOS Safari does have the access to it? Or any other similar bluetooth device which can be accessed?
Not yet. There is a proposal in W3C for a "web-bluetooth" specification which has been partly implemented in the chrome , opera and chrome-for-android browsers, although they need to be activated by the users in a somewhat convoluted manner. Like all these things, it'll take time for the committees to spin their wheels and for the browser makers to decide if they want to support it , and then implement it.
MDN docs: https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API
Apple don't have this built in to Safari (yet), however there is a Web Browser app called WebBLE that implements 'Web Bluetooth' mentioned by Shayne.
Currently the app only supports a subset of the standard, but it's more than enough for most tasks. It's also Open Source so you could add it to a WebView in your own app if needed.
Having said all that, currently I don't believe Web Bluetooth supports accessing Advertising data - so while you can connect to Bluetooth LE devices and interact with them, you may not be able to get the actual Advertisements (which is kind of the point of iBeacon).

Record audio only in browser on iPads

I am working with a school group that has a Django website with a page that allows the users to press a button, record audio, and save this audio to their user pages. This website was built to work on computers and Samsung tablets with Dolphin browsers using the HTML Media Capture to capture the audio by launching the microphone app on the tablets. The group wants to now switch to iPads. I have been researching ways to launch the microphone app from iPads but it seems this is not possible using HTML5. I have done some research and seen the links below, but I don't know what the best strategy is to modify the existing website to make it work on the iPad.
What is the best way forward to allow this group to record audio (not video) from their iPads using a browser-based website?
Research--
http://caniuse.com/#search=getUser - shows getUserMedia will not work on iPads
http://www.html5audio.org/2012/11/capturing-audio-on-ios-6-via-the-videotag.html - looks pretty hacky, does it work?
How to record and play voice in ios6 using HTML5 - using PhoneGap might work, but how would the recording app be launched from the browser and then save back the audio to the users account?
Thanks,
Lee
After having the same problem for a year, I found a new article with a solution: How to record audio from a mobile web page on iOS and Android
One of the newer APIs available is the MediaRecorder API. My first attempt at building this application started with this class. I implemented the entire application and it worked great on my desktop. It was easy to capture audio and the data was already compressed into .ogg format and ready to ship to my server. Then I tried it on iOS. It turns out that the MediaRecorder API is not supported and wouldn’t meet my needs. After I stopped cursing Apple, I began again from scratch.
... That was the last piece of the puzzle that allowed me to construct a working demo and it revolves around three steps:
1. Capture the microphone so we can begin recording
2. Accumulate captured audio data into a series of byte array chunks
3. Combine the chunks into one large array and massage the array into the format of a .wav file
There is a bunch of code on the website. And here is the demo file: https://www.gmass.co/blog/wp-content/uploads/2018/03/wzrecorder.zip
I have tested it and it works on iPad.
Demo: https://q2apro.github.io/wzrecorder/
Safari iOS does not (yet) support the accept="audio/*" part of the <input> element even though it does support taking videos and images through HTML Media Capture.
<input type="file" accept="audio/*" > on iOS 10 will prompt the user to select between:
Take Photo or Video
Photo Library
iCloud Drive
More...
The same code works just fine in Chrome on Android.
Safari in iOS6 was the 1st mobile Safari to support the <input ... > element and I've tested all the way up to iOS10. Chrome on iOS uses the same rendering engine so the same limits apply.

Real time connection from mobile safari to desktop Flash site

I was checking out an iphone game called kijja where they have a live connection from the app to a website and you use the phone as your game controller. Does anyone know what they are using to do this on the backend? http://kijjaa.com/air/
It got me thinking of some ideas and I was wondering if you might be able to do the same thing from a web app in mobile safari instead of a native app, maybe using node.js? Does that seem possible or am I dreaming?

Resources