Bug 55943 - playbackRate should not be set to defaultPlaybackRate in play()
Summary: playbackRate should not be set to defaultPlaybackRate in play()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 08:18 PST by Eric Carlson
Modified: 2011-03-29 10:13 PDT (History)
0 users

See Also:


Attachments
Proposed patch (12.05 KB, patch)
2011-03-10 11:49 PST, Eric Carlson
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2011-03-08 08:18:17 PST
The HTML5 spec used to require that playbackRate be set to defaultPlaybackRate when play() was called. It now requires this only when play() is triggered by the built-in UI:

  The "play" function in a user agent's interface must set the playbackRate 
  attribute to the value of the defaultPlaybackRate attribute before invoking
  the play() method's steps.
Comment 1 Eric Carlson 2011-03-08 09:28:39 PST
Additionally, the spec requires that 'playbackRate' must always return "   the last value it was set to, or 1.0 if it hasn't yet been set".  WebKit doesn't return the last value set if the media engine was not allocated or ready to play at the time it was last set.
Comment 2 Eric Carlson 2011-03-10 11:49:11 PST
Created attachment 85358 [details]
Proposed patch
Comment 3 mitz 2011-03-28 15:58:08 PDT
Comment on attachment 85358 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=85358&action=review

> Source/WebCore/ChangeLog:14
> +        (WebCore::HTMLMediaElement::playbackRate):
> +        (WebCore::HTMLMediaElement::playInternal):
> +        (WebCore::HTMLMediaElement::togglePlayState):
> +        * manual-tests/media-default-playback-rate.html: Added.

Please use the version of the change log that contains comments.
Comment 4 Eric Carlson 2011-03-29 10:13:28 PDT
http://trac.webkit.org/changeset/82272