WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
229485
HTMLVideoElement.currentTime keeps zero for audio source if HTMLVideoElement.muted is true
https://bugs.webkit.org/show_bug.cgi?id=229485
Summary
HTMLVideoElement.currentTime keeps zero for audio source if HTMLVideoElement....
Takahiro Aoyagi
Reported
2021-08-24 18:11:47 PDT
HTMLVideoElement.currentTime keeps zero for audio source if HTMLVideoElement.muted is true. It can't reproducible in Chrome of Firefox. Example code: <script> const video = document.createElement('video'); video.src = 'your_audio_file.mp3'; video.loop = true; video.muted = true; const check = () => { setTimeout(check, 1000); console.log(video.currentTime); }; check(); </script> Another example: You can also confirm the problem in
https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_audio_all
by replacing the code with the following. <video muted controls> <source src="your_audio_file.mp3" type="audio/mpeg"> </video> You will see zero duration time on the control panel. OS: macOS Big Sur 11.5.2 Browser: Safari 14.1.2
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-08-31 18:12:19 PDT
<
rdar://problem/82605737
>
Ahmad Saleem
Comment 2
2023-07-28 04:48:01 PDT
Something like this: <!DOCTYPE html> <html> <body> <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> <video muted controls> <source src="horse.mp3" type="audio/mpeg"> </video> <script> const video = document.createElement('video'); video.src = 'horse.mp3'; video.loop = true; video.muted = true; const check = () => { setTimeout(check, 1000); console.log(video.currentTime); }; check(); </script> </body> </html> I tested and I get '0' multiple events in Safari 16.6, STP175 and Chrome Canary 117, or am I testing it wrong?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug