WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
258567
REGRESSION (Safari 16.x?): MediaRecorder ondataavailable outputs Blobs with size:0 type:""
https://bugs.webkit.org/show_bug.cgi?id=258567
Summary
REGRESSION (Safari 16.x?): MediaRecorder ondataavailable outputs Blobs with s...
Omer Okcuoglu
Reported
2023-06-27 07:09:46 PDT
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.
Attachments
Example js file to test bug.
(1.27 KB, application/x-javascript)
2023-06-27 07:09 PDT
,
Omer Okcuoglu
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-06-27 08:49:13 PDT
<
rdar://problem/111393489
>
Omer Okcuoglu
Comment 2
2023-06-27 14:45:52 PDT
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.
youenn fablet
Comment 3
2023-06-30 01:53:19 PDT
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.
Omer Okcuoglu
Comment 4
2023-06-30 02:23:31 PDT
@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.
Omer Okcuoglu
Comment 5
2023-06-30 02:30:13 PDT
Edit: using Safari version 16.5.1
youenn fablet
Comment 6
2023-06-30 02:34:29 PDT
(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...
Omer Okcuoglu
Comment 7
2023-06-30 02:40:21 PDT
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.
Omer Okcuoglu
Comment 8
2023-07-01 23:51:33 PDT
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!
youenn fablet
Comment 9
2023-07-05 06:23:43 PDT
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?
Omer Okcuoglu
Comment 10
2023-07-06 04:47:53 PDT
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
Omer Okcuoglu
Comment 11
2023-07-09 01:57:41 PDT
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.
youenn fablet
Comment 12
2023-07-17 01:56:53 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/15880
EWS
Comment 13
2023-07-18 08:52:52 PDT
Committed
266130@main
(8c01a9fbfd35): <
https://commits.webkit.org/266130@main
> Reviewed commits have been landed. Closing PR #15880 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug