As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 784932 - <audio>.buffered changes everytime <audio>.currentTime changes (inc. within buffered range)
: <audio>.buffered changes everytime <audio>.currentTime changes (inc. within b...
: regression, testcase
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: 15 Branch
: x86 Windows 7
: -- normal (vote)
: mozilla17
Assigned To: Chris Pearce (:cpearce)
: Maire Reavy [:mreavy] Please needinfo me
Depends on:
Blocks: 755533
  Show dependency treegraph
Reported: 2012-08-22 23:17 PDT by gravgun
Modified: 2012-08-27 12:19 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Example case of the bug. (872 bytes, text/html)
2012-08-22 23:18 PDT, gravgun
no flags Details
Patch (1006 bytes, patch)
2012-08-26 22:32 PDT, Chris Pearce (:cpearce)
roc: review+
Details | Diff | Splinter Review

Description User image gravgun 2012-08-22 23:17:01 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0
Build ID: 20120814224555

Steps to reproduce:

I was creating a canvas wrapper for an audio element, and I use mouse to rotate a knob. I noticed the buffer indicator was blinking when changing currentTime, even when the audio have been fully buffered.

Actual results:

The audio.buffered property empties itself then comes back to correct buffering information when audio.currentTime is changed.

Expected results:

The audio.buffered property should not change when the requested portion of audio have already been buffered.
Comment 1 User image gravgun 2012-08-22 23:18:25 PDT
Created attachment 654521 [details]
Example case of the bug.
Comment 2 User image Loic 2012-08-23 03:13:01 PDT
Did you observe this behavior in Firefox 14?
Comment 3 User image (mostly gone) XtC4UaLL [:xtc4uall] 2012-08-25 03:03:30 PDT
Confirmed in 15 Beta and Trunk. It' WFM in 14 Release.
Comment 4 User image Paul Silaghi, QA [:pauly] 2012-08-25 04:25:05 PDT
Last good nightly: 2012-05-27
First bad nightly: 2012-05-28

Comment 5 User image (mostly gone) XtC4UaLL [:xtc4uall] 2012-08-25 04:31:58 PDT
(In reply to Paul Silaghi [QA] from comment #4)
Got the same Range over here, too.
Maybe regressed by Bug 755533?
Comment 6 User image Loic 2012-08-25 07:34:40 PDT
Same range here with mozreg.
Comment 7 User image Chris Pearce (:cpearce) 2012-08-26 14:54:06 PDT
Ah, so in nsHTMLMediaElement::GetBuffered() only returns buffered ranges if we in readyState >= HAVE_CURRENT_DATA, and in bug 755533 we changed nsHTMLMediaElement::SeekStarted() to set the readyState to HAVE_METADATA...
Comment 8 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2012-08-26 21:32:46 PDT
I think we should change the former condition...
Comment 9 User image Chris Pearce (:cpearce) 2012-08-26 22:32:57 PDT
Created attachment 655513 [details] [diff] [review]

Simple fix: allow HTMLMediaElement.buffered to return results when readyState > HAVE_NOTHING.
Comment 11 User image Ryan VanderMeulen [:RyanVM] 2012-08-27 12:19:20 PDT

Note You need to log in before you can comment on or make changes to this bug.