Index: Source/core/html/shadow/MediaControls.cpp |
diff --git a/Source/core/html/shadow/MediaControls.cpp b/Source/core/html/shadow/MediaControls.cpp |
index 17efb600f9bd20ab826198f3ad3c1282c1341d4f..62c39de593ed5a9fea483c3ba6959f86471e6899 100644 |
--- a/Source/core/html/shadow/MediaControls.cpp |
+++ b/Source/core/html/shadow/MediaControls.cpp |
@@ -273,9 +273,9 @@ void MediaControls::updatePlayState() |
void MediaControls::beginScrubbing() |
{ |
- if (!mediaControllerInterface().paused()) { |
+ if (!mediaElement().togglePlayStateWillPlay()) { |
m_isPausedForScrubbing = true; |
- mediaControllerInterface().pause(); |
+ mediaElement().togglePlayState(); |
} |
} |
@@ -283,8 +283,8 @@ void MediaControls::endScrubbing() |
{ |
if (m_isPausedForScrubbing) { |
m_isPausedForScrubbing = false; |
- if (mediaControllerInterface().paused()) |
- mediaControllerInterface().play(); |
+ if (mediaElement().togglePlayStateWillPlay()) |
+ mediaElement().togglePlayState(); |
} |
} |
@@ -360,7 +360,7 @@ void MediaControls::defaultEventHandler(Event* event) |
if (event->type() == EventTypeNames::mouseover) { |
if (!containsRelatedTarget(event)) { |
m_isMouseOverControls = true; |
- if (!mediaControllerInterface().canPlay()) { |
+ if (!mediaElement().togglePlayStateWillPlay()) { |
makeOpaque(); |
if (shouldHideFullscreenControls()) |
startHideFullscreenControlsTimer(); |
@@ -391,7 +391,7 @@ void MediaControls::defaultEventHandler(Event* event) |
void MediaControls::hideFullscreenControlsTimerFired(Timer<MediaControls>*) |
{ |
- if (mediaControllerInterface().paused()) |
+ if (mediaElement().togglePlayStateWillPlay()) |
return; |
if (!m_isFullscreen) |