Closed
Bug 1246566
Opened 8 years ago
Closed 8 years ago
Volume indicator on <audio> is reset to 100% when its display value changes
Categories
(Toolkit :: Video/Audio Controls, defect)
Toolkit
Video/Audio Controls
Tracking
()
RESOLVED
DUPLICATE
of bug 962560
Tracking | Status | |
---|---|---|
firefox47 | --- | affected |
People
(Reporter: xidorn, Assigned: Dolske)
Details
Attachments
(1 file, 1 obsolete file)
7.85 KB,
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. open "data:text/html,<audio controls id='a'>" 2. change the volume to a different value, e.g. 50% 3. open Web Console, input "a.volume" to confirm the current value is not 1.0 4. enter "a.style.display = 'block'" Expected result: The volume indicator still shows the value we changed to. Actual result: The volume indicator is reseted to 100%, while a.volume still returns the original value
Updated•8 years ago
|
Component: Audio/Video → Video/Audio Controls
Product: Core → Toolkit
Assignee | ||
Comment 1•8 years ago
|
||
Hmm, the binding does get reattached when .display is changed (as expected), but the setupInitialState() code is setting the right volume level. Oh, I see. Bug 649490 changed how we display the volume. The |volumechanged| event listener handles updates correctly, but setupInitialState() doesn't. It needs the volumeForeground.style.paddingRight code. And, hmm, _volumeControlWidth hasn't been computed yet, so a bit more as well. But that seems to be the core issue.
Assignee | ||
Comment 2•8 years ago
|
||
I realized, when looking at the block of default-size fetches, that we have a latent bug with _durationLabelWidth -- we never update the value, and it was already being too early for the media to have loaded a correct value. So it's always just computing the width of "0:00". So if the duration becomes a large value (showing hours), adjustControlSize() probably won't do right thing. I think all the other default-size computations are ok, because they're static.
Assignee: nobody → dolske
Attachment #8720021 -
Flags: review?(jaws)
Assignee | ||
Comment 3•8 years ago
|
||
Bah. I just noted that the isAudioOnly setter can affect style too. :/
Attachment #8720021 -
Attachment is obsolete: true
Attachment #8720021 -
Flags: review?(jaws)
Attachment #8720025 -
Flags: review?(jaws)
Comment 4•8 years ago
|
||
Comment on attachment 8720025 [details] [diff] [review] Patch v.2 Review of attachment 8720025 [details] [diff] [review]: ----------------------------------------------------------------- Please use mozreview to request reviews going forward, as it allows me to get more context on the file when looking at how code has moved from one section to another. The patch looks fine but we should include a test that covers this.
Attachment #8720025 -
Flags: review?(jaws) → feedback+
Xidorn - did you forget to land this?
Flags: needinfo?(quanxunzhen)
Reporter | ||
Comment 6•8 years ago
|
||
I suppose this question is for Dolske.
Flags: needinfo?(quanxunzhen) → needinfo?(dolske)
Comment 7•8 years ago
|
||
Comment on attachment 8720025 [details] [diff] [review] Patch v.2 Let's just land this now. We should get more tests written though.
Flags: needinfo?(dolske)
Attachment #8720025 -
Flags: feedback+ → review+
Updated•8 years ago
|
Keywords: checkin-needed
Comment 9•8 years ago
|
||
This actually looks like it was fixed by bug 962560.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•