web-audio-recording-tests icon indicating copy to clipboard operation
web-audio-recording-tests copied to clipboard

Empty audio / player error when recording with Safari 12.x

Open arj-ary opened this issue 5 years ago • 5 comments

Tried the demo file https://kaliatech.github.io/web-audio-recording-tests/dist/#/test1 on Safari 12.x, the audio player just says error. Posting a screenshot, is this something that is already known? Is there a hack or a workaround that we could use, i have spent enough time looking for a solution for Safari, haven't had any luck.

image

arj-ary avatar Jul 30 '19 14:07 arj-ary

I'm also having the same issue, in the latest version 12.1.2 macOS (Laptop/Desktop) audio is not playing, it works fine for 12.1.1 and in 12.1 of iOS (iPhone, iPad and iPod)

namy16 avatar Aug 01 '19 08:08 namy16

Hmm. It is not a known issue. Here is a screenshot just now from my own tests using:

  • ~2015 Macbook Pro
  • macOS High Sierra 10.13.6
  • Safari 12.1.1, I then upgraded to 12.1.2. Both worked fine for me.
Screen Shot 2019-08-01 at 9 26 21 AM

If you have been doing web audio development, trying other solutions, or running other audio recording apps, it is possible to get your system in to an unrecoverable state where web audio recording simply stops working, I assume to hardware resource contention bugs. I had problems with that during original development, especially on iOS. Only a complete restart would fix. So if you have not yet, I would suggest restarting your machine and trying again. Also make sure no accessories are connected. i.e. no external mics, no paired bluetooth headphones, etc

Questions to help you debug:

  • When you click record for the first time, are you prompted to provide permissions to the microphone?
  • Do you then see a red microphone in the address bar while recording is active?
  • You are accessing this from https://kaliatech.github.io, correct? Not your own host. If so, you must use HTTPS due to Safari restrictions.

kaliatech avatar Aug 02 '19 20:08 kaliatech

having the same issue, tested on iPhone6 plus, iOS 12.4.5, recording data is empty

iefreer avatar Mar 27 '22 09:03 iefreer

I just tested with an iPhone6, iOS 12.5.4 using AWS Device Farm. It seemed to work as expected. Here's video showing it:

  • https://user-images.githubusercontent.com/1301641/160414530-2d368fd3-d94b-4cb6-b290-d8f09dce7612.mp4

So per my previous comment, things to check:

  • When you click record for the first time, are you prompted to provide permissions to the microphone?
  • Do you then see a red microphone in the address bar while recording is active?

Be sure to restart your device, because there are/were many external factors that could cause iOS/Safari to do this until restarted.

kaliatech avatar Mar 28 '22 14:03 kaliatech

For my iPadOS 15.7 it works alternates between working and failing - will give more details soon (red microphone always shows for each recording, and the first time asks for permission)

GreatTA1998 avatar Sep 23 '22 20:09 GreatTA1998