RESOLVED WORKSFORME189330
audio.duration returns "Infinity"
https://bugs.webkit.org/show_bug.cgi?id=189330
Summary audio.duration returns "Infinity"
Stephen
Reported 2018-09-05 18:17:54 PDT
Created attachment 348990 [details] Alert that appears with test code. When using audio.duration on iOS, Mac, other Safari supported devices, it will return "Infinity." This occurs on iOS 12 and below. This can be easy to reproduce, with code, provided below. <audio id="audio" ontimeupdate="test()" src="myaudio.mp3"> <script> function test(){ let audio = document.getElementId("audio"); alert(audio.duration); } </script>
Attachments
Alert that appears with test code. (45.29 KB, image/jpeg)
2018-09-05 18:17 PDT, Stephen
no flags
Keith Miller
Comment 1 2018-09-19 08:38:07 PDT
Hmm, I think this is probably not a JavaScriptCore issue. I'm gonna move this over to Media Elements.
Radar WebKit Bug Importer
Comment 2 2018-09-19 08:38:25 PDT
Jer Noble
Comment 3 2018-09-19 13:32:47 PDT
Stephen, could you attach the "myaudio.mp3" that triggers this behavior?
Peng Liu
Comment 4 2019-08-23 13:12:05 PDT
I cannot reproduce the bug on the latest version of iOS 12 with several mp3 files. If Stephen can provide the mp3 file he used to reproduce the bug, I would be happy to open this bug and investigate it.
Note You need to log in before you can comment on or make changes to this bug.