[Webkit-unassigned] [Bug 279432] New: MediaRecorder generates huge chunks when pausing & resuming camera access on macOS and iOS
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 10 02:50:09 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=279432
Bug ID: 279432
Summary: MediaRecorder generates huge chunks when pausing &
resuming camera access on macOS and iOS
Product: WebKit
Version: Safari 17
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Media
Assignee: webkit-unassigned at lists.webkit.org
Reporter: naicuoctavian at gmail.com
1. Using Safari on macOS, go to https://addpipe.com/media-recorder-api-demo/ and click "Allow" when asked for camera & mic access
2. Start recording, you'll see each chunk size and the associated timecode logged on the page
3. Now click on the red camera icon in the browser's URL input bar and click "Pause", you'll see the size drop to 0 while the timecode remains unchanged (as expected)
4. After a few seconds, using the same red camera icon, click Resume. For a few ondataavailable calls, the size is will be way larger than usual. After a while the size value comes back down.
Here's a recent log where the chunk size reaches 6.59MB after Resuming instead of the usual 1-1.3MB
----
Start recording...
Using video/mp4
audio:{"deviceId":"0746899703E64653F52874987F3BD33569CC892A","echoCancellation":true,"groupId":"E54695174C70D97DC34C99D75601F73794ADC3D3","sampleRate":16000,"volume":1}
video:{"aspectRatio":1.7777777777777777,"deviceId":"D188CC318FEB99436764CF524348EDF6F25E8A0F","frameRate":30,"groupId":"7A20AE9C1F2F7B4515E48F13942DDB78BF529458","height":720,"width":1280}
mediaRecorder.onstart, mediaRecorder.state = recording
onstart - Audio track.readyState=live, track.muted=false
onstart - Video track.readyState=live, track.muted=false
mediaRecorder.ondataavailable, e.data.size=650491, e.timecode=0
mediaRecorder.ondataavailable, e.data.size=976849, e.timecode=1.024
mediaRecorder.ondataavailable, e.data.size=973571, e.timecode=2.016
mediaRecorder.ondataavailable, e.data.size=1222025, e.timecode=3.04
mediaRecorder.ondataavailable, e.data.size=1215702, e.timecode=4.032
mediaRecorder.ondataavailable, e.data.size=1355689, e.timecode=5.056
mediaRecorder.ondataavailable, e.data.size=1177430, e.timecode=6.048
mediaRecorder.ondataavailable, e.data.size=1326199, e.timecode=7.04
mediaRecorder.ondataavailable, e.data.size=1228857, e.timecode=8.064
mediaRecorder.ondataavailable, e.data.size=1627209, e.timecode=9.056
mediaRecorder.ondataavailable, e.data.size=1339671, e.timecode=10.08
mediaRecorder.ondataavailable, e.data.size=164405, e.timecode=11.072
mediaRecorder.ondataavailable, e.data.size=0, e.timecode=11.2
mediaRecorder.ondataavailable, e.data.size=0, e.timecode=11.2
mediaRecorder.ondataavailable, e.data.size=0, e.timecode=11.2
mediaRecorder.ondataavailable, e.data.size=0, e.timecode=11.2
mediaRecorder.ondataavailable, e.data.size=0, e.timecode=11.2
mediaRecorder.ondataavailable, e.data.size=0, e.timecode=11.2
mediaRecorder.ondataavailable, e.data.size=355, e.timecode=11.2
mediaRecorder.ondataavailable, e.data.size=3890620, e.timecode=11.264
mediaRecorder.ondataavailable, e.data.size=6592507, e.timecode=12.288
mediaRecorder.ondataavailable, e.data.size=4531837, e.timecode=13.28
mediaRecorder.ondataavailable, e.data.size=2248763, e.timecode=14.304
mediaRecorder.ondataavailable, e.data.size=1537077, e.timecode=15.32
mediaRecorder.ondataavailable, e.data.size=980034, e.timecode=16.344
mediaRecorder.ondataavailable, e.data.size=1109501, e.timecode=17.344
mediaRecorder.ondataavailable, e.data.size=1536439, e.timecode=18.336
mediaRecorder.ondataavailable, e.data.size=1271784, e.timecode=19.36
mediaRecorder.ondataavailable, e.data.size=1079751, e.timecode=20.352
mediaRecorder.ondataavailable, e.data.size=1220153, e.timecode=21.376
mediaRecorder.ondataavailable, e.data.size=962462, e.timecode=0
mediaRecorder.onstop, mediaRecorder.state = inactive
---
The same effect is observed on Safari on macOS by using the grey camera icon that shows up in the browser page tab (with multiple tabs open).
The same effect is observed on Safari on iOS by using the "Stop Using Camera" and "Start Using Camera" options.
Tested with Safari 17.6 on macOS Sonoma 14.6.1 and Safari on iOS 17.6.1 .
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240910/b41478fd/attachment.htm>
More information about the webkit-unassigned
mailing list