| Summary: | REGRESSION (Safari 16.x?): MediaRecorder ondataavailable outputs Blobs with size:0 type:"" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Omer Okcuoglu <omerokcuoglu> | ||||
| Component: | Media | Assignee: | youenn fablet <youennf> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Blocker | CC: | chrisguttandin, eric.carlson, jer.noble, webkit-bug-importer, youennf | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 16 | ||||||
| Hardware: | Mac (Apple Silicon) | ||||||
| OS: | macOS 13 | ||||||
| Attachments: |
|
||||||
iPadOS webkit seems to be working as expected; so this seems to be an osX Safari specific issue. Made the following test via using StreamDestination, triggering sounds during recording. If no sound is played following the initial playback; 1) Chrome reports a consistent Blob size of 238, each second. 2) Firefox reports a Blob size of 0 that spikes at 1047 in every 3-4 seconds. 3) iPad test is done within "Koder App". Assuming it uses webkit, it reports fluctuating Blob sizes of 0 - 604 - 1148 - 544 - 1208. Seems to be the least stable. Perhaps this report does not effect the recorded audio output, I was simply checking the signal flow for this test. Also during sound playback, block size is reported as 0 many times. Here is a jsfiddle that should show the issue: https://jsfiddle.net/m80q97yn/ @Omer, can you confirm you are able to reproduce this issue? Which platform do you have issues with? Testing locally on my macStudio, it seems to work fine. @Youenn issue is still the same. Blob return is 0. Below is the output until I hit stop: starting mimeType: audio/mp4 data captured size: 0 data captured size: 0 data captured size: 0 data captured size: 0 data captured size: 0 captured: NaN I am on Hardware: m1 Pro Macbook Pro 16" osX: Ventura 13.4.1 Safari: 16.4 https://jsfiddle.net/m80q97yn/ works fine on iOS. If I recall correctly, I did not experience this issue with Safari 16.2. Edit: using Safari version 16.5.1 (In reply to Omer Okcuoglu from comment #4) > @Youenn issue is still the same. Blob return is 0. > > Below is the output until I hit stop: > > starting > mimeType: audio/mp4 > data captured size: 0 > data captured size: 0 > data captured size: 0 > data captured size: 0 > data captured size: 0 > captured: NaN > > I am on > Hardware: m1 Pro Macbook Pro 16" > osX: Ventura 13.4.1 > Safari: 16.4 > > https://jsfiddle.net/m80q97yn/ works fine on iOS. > > If I recall correctly, I did not experience this issue with Safari 16.2. Can you try on latest Safari Tech Preview. I am not able to reproduce on my macBookPro, but Sonoma... Problem continues with Safari Tech Preview version 173. I will try your link in an Apple Store that are likely to have m2 macbook pros with Ventura with whatever Safari version they have. Problem solved! It is about the system Sampling Rate. Mine was set to 96kHz and switching back to 48kHz has made the MediaRecorder stream working again as expected. Apparently this also solves my other previously submitted bug: https://bugs.webkit.org/show_bug.cgi?id=249970 With Safari 16.4 these pops started to happen more often rather than just the initial pops. Keeping sample rate at 48kHz has eliminated the pops too! The issue is that we are not able to create a AudioConverterNew: 2023-06-30 12:46:29.299606+0300 0x364661 Error 0x0 57221 com.apple.WebKit.GPU: (WebCore) [com.apple.WebKit:MediaStream] AudioSampleBufferCompressor AudioConverterNew failed with 1718449215 I tried switching to 96KHz on my setup and media recorder works for me. Maybe OS support is different. @Omer, how did you change to 96KHz and back to 48KHz? Once I set the Sampling Rate on Audio MIDI Setup from 96k to 48k and vice versa; I reload the page. Then the 48k works and 96k does not work. If I change the sampling rate and not reload the page, the MediaRecorder keeps its respective behaviour. My OS is 13.4.1 Safari: 16.5.1 I can add one more note which might be important. The sampling rate change in Audio/MIDI setup needs be made on Audio Output like MacbookPro Speakers. Interestingly changing Sampling rate on Microphone Input has no effect. System Output sampling rate determines whether it works or not. I have checked this problem and same approach with Intel Macbook Pro on Safari 15 and managed to reproduce the problem. Pull request: https://github.com/WebKit/WebKit/pull/15880 Committed 266130@main (8c01a9fbfd35): <https://commits.webkit.org/266130@main> Reviewed commits have been landed. Closing PR #15880 and removing active labels. |
Created attachment 466831 [details] Example js file to test bug. Hi, MediaRecorder ondataavailable outputs Blobs with size:0 type:"" This issue is introduced with Safari 16. I can not pin point the version. MediaRecorder works flawlessly with Safari 15 on Intel and in any other browser. Problem is consistent with both of these streams: 1- audioContext.createMediaStreamDestination 2- navigator.mediaDevices.getUserMedia({ audio: true }) I am attaching a js file for you to test. It only requires you to insert a button in your html. It will output ondataavailable Blobs every second upon click.