Bug 204228
| Summary: | HTMLAudioElement currentTime out of sync with actual audio when linked to AudioContext | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | sam |
| Component: | Web Audio | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | brianpeiris, chrisguttandin, tero, thomas.blackmon, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 13 | ||
| Hardware: | Mac | ||
| OS: | macOS 10.14 | ||
sam
It seems that when an HTMLAudioElement is linked up to AudioContext (via createMediaElementSource), the audio element's currentTime is out of sync with playback.
Steps to reproduce:
1. Go to https://codesandbox.io/s/safari-time-delay-9hokn
2. Click the play button in the audio control, confirm that the tones occur exactly on the second
3. Reload the page
4. Click the “Connect to AudioContext” button
5. Click the play button
You'll then see that the timing is off. This doesn't occur in Chrome nor Firefox.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/57341556>
Brian Peiris
We're running into this problem on https://hubs.mozilla.com/ with videos as well. We use createMediaElementSource to implement 3D positional audio in our WebGL app.
I've adapted Sam's test to demonstrate the bug with videos as well, where the delay is much more prominent. https://brianpeiris.github.io/safari-video-source-test/
I reproduce on a 2018 13-inch MacBook Pro, with macOS 10.14.6 and Safari 13.0.4.
Tero Parviainen
This is still an issue. Tested on Safari 15.1 on Monterey, and iOS 15.0.2.