Git Product home page Git Product logo

Comments (4)

xiangyuecn avatar xiangyuecn commented on June 19, 2024

ios Safari里面是这样的,打开录音后 过一会再打开又会弹权限框

from recorder.

badspider7 avatar badspider7 commented on June 19, 2024

我也遇到过,有什么解决办法嘛

from recorder.

tangtangyue avatar tangtangyue commented on June 19, 2024

有什么解决办法么

from recorder.

xiangyuecn avatar xiangyuecn commented on June 19, 2024

ios的浏览器跟webview都是这样的,如果是app,可以给webview适配一下静默授权,iOS 15+支持;浏览器没办法

Recorder/README.md

Lines 356 to 363 in fe968d1

## 【附】iOS App - WebView中录音示例
在iOS App WebView中使用本库来录音,需要在App源码 `Info.plist` 中声明使用麦克风 `NSMicrophoneUsageDescription`,无需其他处理,WebView会自己处理好录音权限;注意:iOS App需要在项目Background Modes中勾选Audio才能在后台保持录音,不然App切到后台后立马会停止录音。
iOS 14.3+以上版本才支持WebView中进行H5录音;iOS 15+提供了静默授权支持,参考[WKUIDelegate](https://developer.apple.com/documentation/webkit/wkuidelegate)中的 `Requesting Permissions` -> `requestMediaCapturePermissionFor`,默认未实现,会导致WebView每次打开后第一次录音时、或长时间无操作再打开录音时均会弹出录音权限对话框。
iOS 11.0-14.2:纯粹的H5录音在iOS WebView中是不支持的,需要有Native层的支持,具体参考RecordApp中的[app-support-sample/demo_ios](https://github.com/xiangyuecn/Recorder/tree/master/app-support-sample/demo_ios),含iOS App源码。

from recorder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.