HTML5 audio - currentTime attribute wrong after seeking on Safari

1

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

html
audio
safari
asked on Stack Overflow Aug 2, 2018 by Vadym • edited Aug 3, 2018 by Vadym

1 Answer

0

Was fixed on macOS 10.15 (Safari 13.0.3) On macOS 10.14 and 10.13 (Safari 13.0.3) is still reproduced.

answered on Stack Overflow Nov 29, 2019 by Vadym

User contributions licensed under CC BY-SA 3.0