简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM