Bug 229485 - HTMLVideoElement.currentTime keeps zero for audio source if HTMLVideoElement.muted is true
Summary: HTMLVideoElement.currentTime keeps zero for audio source if HTMLVideoElement....
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-24 18:11 PDT by Takahiro Aoyagi
Modified: 2021-08-31 18:12 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Takahiro Aoyagi 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
Comment 1 Radar WebKit Bug Importer 2021-08-31 18:12:19 PDT
<rdar://problem/82605737>