Bug 101824

Summary: REGRESSION (r126157): Setting volume before load does not persist after load
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: MediaAssignee: Jer Noble <jer.noble>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: darin, eric.carlson, feature-media-reviews, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 87304    
Bug Blocks:    
Attachments:
Description Flags
Patch darin: review+

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 ***