Make scrubbing a MediaControls-internal concept
HTMLMediaElement::beginScrubbing() would setPausedInternal(true), a mode
of pausing that is invisible to scripts. If a media controller was
detached while scrubbing, HTMLMediaElement::endScrubbing() would never
be called and the element would be stuck in this mode.
Since a user can already pause, scrub and then continue playing, making
MediaControls do the same should work just fine. Simply keep track of
the state before scrubbing and avoid updating the play button(s) as long
as we're scrubbing.
Note that the special handling of ended() is not needed, since reaching
the end of the resource pauses. This wasn't the case at the time the
code was originally written.
BUG=341813
Review URL: https://codereview.chromium.org/204803002
git-svn-id: svn://svn.chromium.org/blink/trunk@169814 bbb929c8-8fbe-4397-9dbb-9b2b20218538
10 files changed