Search code examples
htmliosiphonetypescriptmediarecorder

iOS MediaRecorder - Record Video Via Camera Through MediaRecorder and HTML5 Video


Issue:

  • Can't record video or get a video stream from the camera on iOS through my web application, this is running angular and build via ng build

Investigation:

  • Reviewed various websites relating to Apple iOS websockets, MediaRecorder, and getUserDevices()
  • Also spec and version supported specs. all docs I found say that the MediaRecorder is an experimental feature and needs to be enabled manually.

Other:

  • My code works fine on Android Chrome, Desktop Chrome, Opera (PC/Mobile), and on firefox (PC/Mobile)

Sadly I'm not sure what to do. since the docs say that iOS doesn't support the recording API.

  • My site is using https with valid certificates.

Any tips, links, resources, or code would be appreciated.


Solution

  • I think you've come across the answer to your issue already.

    With your current implementation, you are not going to be able to support Safari or ANY iOS browser (they are all Webkit/Safari under the hood).

    https://caniuse.com/?search=MediaRecorder

    There are flags you can enable to make it work, but this is not something that you can generally ask your customers to do :)

    Doug