Bug 101824 - REGRESSION (r126157): Setting volume before load does not persist after load
Summary: REGRESSION (r126157): Setting volume before load does not persist after load
Status: RESOLVED DUPLICATE of bug 101954
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on: 87304
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-09 18:06 PST by Jer Noble
Modified: 2012-11-12 11:26 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.69 KB, patch)
2012-11-09 18:10 PST, Jer Noble
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2012-11-09 18:06:40 PST
Preserve the state of m_muted and m_volume across MediaPlayerPrivate  instances during load.
Comment 1 Jer Noble 2012-11-09 18:10:45 PST
Created attachment 173421 [details]
Patch
Comment 2 Darin Adler 2012-11-09 18:13:52 PST
Comment on attachment 173421 [details]
Patch

Is there a good way to regression-test this?
Comment 3 Jer Noble 2012-11-09 18:20:17 PST
It would be a mac specific test, as it would require loading a piece of media which AVFoundation cannot load but QuickTime can.  To my knowledge, no other port has multiple MediaPlayerPrivate implementations.

I can see what I can come up with.
Comment 4 Jer Noble 2012-11-09 23:25:57 PST
After making a test case, it looks like the breakage is more significant.  It doesn't require two media engines in order to trigger.  (Though that helps.)

With the regressing changeset in place, the following test fails:

video.volume = 0;
video.src = foo.mov;
video.load();
/* wait for loadedmetadata */
assert(video.volume == 0) // Fails, volume is 1.
Comment 5 Jer Noble 2012-11-09 23:30:25 PST
Regressed in http://trac.webkit.org/changeset/126157.
Comment 6 Jer Noble 2012-11-10 00:32:33 PST
Drat.  My testcase will fail, because it can only test what HTMLMediaElement thinks the volume is, not what the volume on the MediaPlayerPrivate actually is.  However, I have verified that on WebKit Mac ToT, setting the video.volume = 0  before load() is ignored, and the video plays at full volume.
Comment 7 Jer Noble 2012-11-10 00:33:55 PST
Looks like it's not going to be possible to write a testcase for this, as there's no way to query the actual volume of the media engine from JavaScript.
Comment 8 Jer Noble 2012-11-12 11:26:31 PST
Regressing revision rolled out by bug #101954.

*** This bug has been marked as a duplicate of bug 101954 ***