Open Bug 1009999 Opened 10 years ago Updated 2 years ago

Make media canplaythrough/playing/readyState calculation more reliable/stable

Categories

(Core :: Audio/Video: Playback, defect)

29 Branch
defect

Tracking

()

People

(Reporter: cpearce, Unassigned)

Details

I propose we change our HTMLMediaElement.readyState calculation to make it more reliable. This would make the firing of "playing", "canplay", and "canplaythrough" events more reliable.

Currently we fire these events based on how many decoded video/audio samples we have in our MediaQueues. On slow devices we may never end up with 2+ decoded video frames, and we'll not ready readyState HAVE_FUTURE_DATA, even through we can actually play OK.

One idea would be to calculate the readyState based on the values of HTMLMediaElement.buffered instead based on the length of our MediaQueues.
Component: Audio/Video → Audio/Video: Playback

I'm sorry, I'm not sure I understand what problem you are seeing. When a video www.timesiwak.com starts playing is up to the the website author. We do sometimes disable playback in hidden tabs, and there's a preference to block automatically starting video playback on launch.

Is that was you are referring to? Otherwise, there's not much we can do differently.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.