I wanted to sync audio music with some animation on the page.
I check audio currentTime with some template and starting an animation at the right moment. All works fine except Safari. After a user uses seeking currentTime is not synchronized with an audio.
Example on codepen: https://codepen.io/vadymchyk/pen/pZVeaZ?editors=1111
Audio has a constant bitrate. afinfo:
File: copy_ss120bpm_4minute_cla1.mp3
File type ID: MPG3
Num Tracks: 1
Data format: 2 ch, 44100 Hz, '.mp3' (0x00000000) 0 bits/channel, 0 bytes/packet, 1152 frames/packet, 0 bytes/frame no channel layout.
estimated duration: 243.774667 sec
audio bytes: 5850592
audio packets: 9332
bit rate: 192000 bits per second
packet size upper bound: 1052
maximum packet size: 627
audio data file offset: 671
optimized
Who can tell what the problem is?
PS No problems on mobile Safari
Was fixed on macOS 10.15 (Safari 13.0.3) On macOS 10.14 and 10.13 (Safari 13.0.3) is still reproduced.
User contributions licensed under CC BY-SA 3.0