2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #include "MediaControlRootElement.h"
33 #include "HTMLMediaElement.h"
34 #include "HTMLNames.h"
35 #include "MediaControlElements.h"
36 #include "MouseEvent.h"
38 #include "RenderTheme.h"
41 #if ENABLE(VIDEO_TRACK)
42 #include "TextTrackCue.h"
45 #if ENABLE(TIZEN_FULLSCREEN_API)
53 static const double timeWithoutMouseMovementBeforeHidingControls = 3;
54 #if ENABLE(TIZEN_FULLSCREEN_API)
55 const IntSize compareResolution(720, 1280);
58 MediaControlRootElement::MediaControlRootElement(Document* document)
59 : MediaControls(document)
60 , m_mediaController(0)
63 , m_returnToRealTimeButton(0)
65 , m_currentTimeDisplay(0)
67 , m_timeRemainingDisplay(0)
68 , m_timelineContainer(0)
70 , m_seekForwardButton(0)
71 , m_toggleClosedCaptionsButton(0)
72 , m_panelMuteButton(0)
74 , m_volumeSliderMuteButton(0)
75 , m_volumeSliderContainer(0)
76 , m_fullScreenButton(0)
77 , m_fullScreenMinVolumeButton(0)
78 , m_fullScreenVolumeSlider(0)
79 , m_fullScreenMaxVolumeButton(0)
81 #if ENABLE(VIDEO_TRACK)
82 , m_textDisplayContainer(0)
84 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
85 , m_hideControlsTimer(this, &MediaControlRootElement::hideControlsTimerFired)
87 , m_hideFullscreenControlsTimer(this, &MediaControlRootElement::hideFullscreenControlsTimerFired)
89 , m_isMouseOverControls(false)
90 , m_isFullscreen(false)
94 PassRefPtr<MediaControls> MediaControls::create(Document* document)
96 return MediaControlRootElement::create(document);
99 PassRefPtr<MediaControlRootElement> MediaControlRootElement::create(Document* document)
101 if (!document->page())
104 RefPtr<MediaControlRootElement> controls = adoptRef(new MediaControlRootElement(document));
106 RefPtr<MediaControlPanelElement> panel = MediaControlPanelElement::create(document);
110 RefPtr<MediaControlRewindButtonElement> rewindButton = MediaControlRewindButtonElement::create(document);
111 controls->m_rewindButton = rewindButton.get();
112 panel->appendChild(rewindButton.release(), ec, true);
116 RefPtr<MediaControlPlayButtonElement> playButton = MediaControlPlayButtonElement::create(document);
117 controls->m_playButton = playButton.get();
118 panel->appendChild(playButton.release(), ec, true);
122 RefPtr<MediaControlReturnToRealtimeButtonElement> returnToRealtimeButton = MediaControlReturnToRealtimeButtonElement::create(document);
123 controls->m_returnToRealTimeButton = returnToRealtimeButton.get();
124 panel->appendChild(returnToRealtimeButton.release(), ec, true);
128 if (document->page()->theme()->usesMediaControlStatusDisplay()) {
129 RefPtr<MediaControlStatusDisplayElement> statusDisplay = MediaControlStatusDisplayElement::create(document);
130 controls->m_statusDisplay = statusDisplay.get();
131 panel->appendChild(statusDisplay.release(), ec, true);
136 RefPtr<MediaControlTimelineContainerElement> timelineContainer = MediaControlTimelineContainerElement::create(document);
138 RefPtr<MediaControlCurrentTimeDisplayElement> currentTimeDisplay = MediaControlCurrentTimeDisplayElement::create(document);
139 controls->m_currentTimeDisplay = currentTimeDisplay.get();
140 timelineContainer->appendChild(currentTimeDisplay.release(), ec, true);
144 RefPtr<MediaControlTimelineElement> timeline = MediaControlTimelineElement::create(document, controls.get());
145 controls->m_timeline = timeline.get();
146 timelineContainer->appendChild(timeline.release(), ec, true);
150 RefPtr<MediaControlTimeRemainingDisplayElement> timeRemainingDisplay = MediaControlTimeRemainingDisplayElement::create(document);
151 controls->m_timeRemainingDisplay = timeRemainingDisplay.get();
152 timelineContainer->appendChild(timeRemainingDisplay.release(), ec, true);
156 controls->m_timelineContainer = timelineContainer.get();
157 panel->appendChild(timelineContainer.release(), ec, true);
161 // FIXME: Only create when needed <http://webkit.org/b/57163>
162 RefPtr<MediaControlSeekBackButtonElement> seekBackButton = MediaControlSeekBackButtonElement::create(document);
163 controls->m_seekBackButton = seekBackButton.get();
164 panel->appendChild(seekBackButton.release(), ec, true);
168 // FIXME: Only create when needed <http://webkit.org/b/57163>
169 RefPtr<MediaControlSeekForwardButtonElement> seekForwardButton = MediaControlSeekForwardButtonElement::create(document);
170 controls->m_seekForwardButton = seekForwardButton.get();
171 panel->appendChild(seekForwardButton.release(), ec, true);
175 if (document->page()->theme()->supportsClosedCaptioning()) {
176 RefPtr<MediaControlToggleClosedCaptionsButtonElement> toggleClosedCaptionsButton = MediaControlToggleClosedCaptionsButtonElement::create(document);
177 controls->m_toggleClosedCaptionsButton = toggleClosedCaptionsButton.get();
178 panel->appendChild(toggleClosedCaptionsButton.release(), ec, true);
183 // FIXME: Only create when needed <http://webkit.org/b/57163>
184 RefPtr<MediaControlFullscreenButtonElement> fullScreenButton = MediaControlFullscreenButtonElement::create(document, controls.get());
185 controls->m_fullScreenButton = fullScreenButton.get();
186 panel->appendChild(fullScreenButton.release(), ec, true);
188 // The mute button and the slider element should be in the same div.
189 RefPtr<HTMLDivElement> panelVolumeControlContainer = HTMLDivElement::create(document);
191 if (document->page()->theme()->usesMediaControlVolumeSlider()) {
192 RefPtr<MediaControlVolumeSliderContainerElement> volumeSliderContainer = MediaControlVolumeSliderContainerElement::create(document);
194 RefPtr<MediaControlVolumeSliderElement> slider = MediaControlVolumeSliderElement::create(document);
195 controls->m_volumeSlider = slider.get();
196 volumeSliderContainer->appendChild(slider.release(), ec, true);
200 // This is a duplicate mute button, which is visible in some ports at the bottom of the volume bar.
201 // It's important only when the volume bar is displayed below the controls.
202 RefPtr<MediaControlVolumeSliderMuteButtonElement> volumeSliderMuteButton = MediaControlVolumeSliderMuteButtonElement::create(document);
203 controls->m_volumeSliderMuteButton = volumeSliderMuteButton.get();
204 volumeSliderContainer->appendChild(volumeSliderMuteButton.release(), ec, true);
209 controls->m_volumeSliderContainer = volumeSliderContainer.get();
210 panelVolumeControlContainer->appendChild(volumeSliderContainer.release(), ec, true);
215 RefPtr<MediaControlPanelMuteButtonElement> panelMuteButton = MediaControlPanelMuteButtonElement::create(document, controls.get());
216 controls->m_panelMuteButton = panelMuteButton.get();
217 panelVolumeControlContainer->appendChild(panelMuteButton.release(), ec, true);
221 panel->appendChild(panelVolumeControlContainer, ec, true);
225 // FIXME: Only create when needed <http://webkit.org/b/57163>
226 RefPtr<MediaControlFullscreenVolumeMinButtonElement> fullScreenMinVolumeButton = MediaControlFullscreenVolumeMinButtonElement::create(document);
227 controls->m_fullScreenMinVolumeButton = fullScreenMinVolumeButton.get();
228 panel->appendChild(fullScreenMinVolumeButton.release(), ec, true);
232 RefPtr<MediaControlFullscreenVolumeSliderElement> fullScreenVolumeSlider = MediaControlFullscreenVolumeSliderElement::create(document);
233 controls->m_fullScreenVolumeSlider = fullScreenVolumeSlider.get();
234 panel->appendChild(fullScreenVolumeSlider.release(), ec, true);
238 RefPtr<MediaControlFullscreenVolumeMaxButtonElement> fullScreenMaxVolumeButton = MediaControlFullscreenVolumeMaxButtonElement::create(document);
239 controls->m_fullScreenMaxVolumeButton = fullScreenMaxVolumeButton.get();
240 panel->appendChild(fullScreenMaxVolumeButton.release(), ec, true);
244 controls->m_panel = panel.get();
245 controls->appendChild(panel.release(), ec, true);
249 return controls.release();
252 void MediaControlRootElement::setMediaController(MediaControllerInterface* controller)
254 if (m_mediaController == controller)
256 m_mediaController = controller;
259 m_rewindButton->setMediaController(controller);
261 m_playButton->setMediaController(controller);
262 if (m_returnToRealTimeButton)
263 m_returnToRealTimeButton->setMediaController(controller);
265 m_statusDisplay->setMediaController(controller);
266 if (m_currentTimeDisplay)
267 m_currentTimeDisplay->setMediaController(controller);
269 m_timeline->setMediaController(controller);
270 if (m_timeRemainingDisplay)
271 m_timeRemainingDisplay->setMediaController(controller);
272 if (m_timelineContainer)
273 m_timelineContainer->setMediaController(controller);
274 if (m_seekBackButton)
275 m_seekBackButton->setMediaController(controller);
276 if (m_seekForwardButton)
277 m_seekForwardButton->setMediaController(controller);
278 if (m_toggleClosedCaptionsButton)
279 m_toggleClosedCaptionsButton->setMediaController(controller);
280 if (m_panelMuteButton)
281 m_panelMuteButton->setMediaController(controller);
283 m_volumeSlider->setMediaController(controller);
284 if (m_volumeSliderMuteButton)
285 m_volumeSliderMuteButton->setMediaController(controller);
286 if (m_volumeSliderContainer)
287 m_volumeSliderContainer->setMediaController(controller);
288 if (m_fullScreenButton)
289 m_fullScreenButton->setMediaController(controller);
290 if (m_fullScreenMinVolumeButton)
291 m_fullScreenMinVolumeButton->setMediaController(controller);
292 if (m_fullScreenVolumeSlider)
293 m_fullScreenVolumeSlider->setMediaController(controller);
294 if (m_fullScreenMaxVolumeButton)
295 m_fullScreenMaxVolumeButton->setMediaController(controller);
297 m_panel->setMediaController(controller);
298 #if ENABLE(VIDEO_TRACK)
299 if (m_textDisplayContainer)
300 m_textDisplayContainer->setMediaController(controller);
305 void MediaControlRootElement::show()
307 m_panel->setIsDisplayed(true);
309 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
310 if (m_mediaController->hasVideo() && !m_panel->isOpaque()) {
312 m_hideControlsTimer.startOneShot(timeWithoutMouseMovementBeforeHidingControls);
317 void MediaControlRootElement::hide()
319 m_panel->setIsDisplayed(false);
321 m_volumeSliderContainer->hide();
324 void MediaControlRootElement::makeOpaque()
326 m_panel->makeOpaque();
329 void MediaControlRootElement::makeTransparent()
331 m_panel->makeTransparent();
332 m_volumeSliderContainer->hide();
335 void MediaControlRootElement::reset()
337 Page* page = document()->page();
341 updateStatusDisplay();
343 if (m_mediaController->supportsFullscreen())
344 m_fullScreenButton->show();
346 m_fullScreenButton->hide();
348 float duration = m_mediaController->duration();
349 if (isfinite(duration) || page->theme()->hasOwnDisabledStateHandlingFor(MediaSliderPart)) {
350 m_timeline->setDuration(duration);
351 m_timelineContainer->show();
352 m_timeline->setPosition(m_mediaController->currentTime());
355 m_timelineContainer->hide();
357 if (m_mediaController->hasAudio() || page->theme()->hasOwnDisabledStateHandlingFor(MediaMuteButtonPart))
358 m_panelMuteButton->show();
360 m_panelMuteButton->hide();
363 m_volumeSlider->setVolume(m_mediaController->volume());
365 if (m_toggleClosedCaptionsButton) {
366 if (m_mediaController->hasClosedCaptions())
367 m_toggleClosedCaptionsButton->show();
369 m_toggleClosedCaptionsButton->hide();
372 m_playButton->updateDisplayType();
374 #if ENABLE(FULLSCREEN_API)
375 if (m_fullScreenVolumeSlider)
376 m_fullScreenVolumeSlider->setVolume(m_mediaController->volume());
378 if (m_isFullscreen) {
379 if (m_mediaController->isLiveStream()) {
380 m_seekBackButton->hide();
381 m_seekForwardButton->hide();
382 m_rewindButton->show();
383 m_returnToRealTimeButton->show();
385 m_seekBackButton->show();
386 m_seekForwardButton->show();
387 m_rewindButton->hide();
388 m_returnToRealTimeButton->hide();
392 if (!m_mediaController->isLiveStream()) {
393 m_returnToRealTimeButton->hide();
394 m_rewindButton->show();
396 m_returnToRealTimeButton->show();
397 m_rewindButton->hide();
403 void MediaControlRootElement::playbackStarted()
405 m_playButton->updateDisplayType();
406 m_timeline->setPosition(m_mediaController->currentTime());
409 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
410 m_hideControlsTimer.startOneShot(timeWithoutMouseMovementBeforeHidingControls);
413 startHideFullscreenControlsTimer();
417 void MediaControlRootElement::playbackProgressed()
419 m_timeline->setPosition(m_mediaController->currentTime());
422 #if !ENABLE(TIZEN_GSTREAMER_VIDEO)
423 if (!m_isMouseOverControls && m_mediaController->hasVideo())
428 void MediaControlRootElement::playbackStopped()
430 m_playButton->updateDisplayType();
431 m_timeline->setPosition(m_mediaController->currentTime());
435 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
436 m_hideControlsTimer.stop();
438 stopHideFullscreenControlsTimer();
442 void MediaControlRootElement::updateTimeDisplay()
444 float now = m_mediaController->currentTime();
445 float duration = m_mediaController->duration();
447 Page* page = document()->page();
451 // Allow the theme to format the time.
453 m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), ec);
454 m_currentTimeDisplay->setCurrentValue(now);
456 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
457 m_timeRemainingDisplay->setInnerText(page->theme()->formatMediaControlsTime(duration), ec);
458 m_timeRemainingDisplay->setCurrentValue(duration);
460 m_timeRemainingDisplay->setInnerText(page->theme()->formatMediaControlsRemainingTime(now, duration), ec);
461 m_timeRemainingDisplay->setCurrentValue(now - duration);
465 void MediaControlRootElement::reportedError()
467 Page* page = document()->page();
471 if (!page->theme()->hasOwnDisabledStateHandlingFor(MediaSliderPart))
472 m_timelineContainer->hide();
474 if (!page->theme()->hasOwnDisabledStateHandlingFor(MediaMuteButtonPart))
475 m_panelMuteButton->hide();
477 m_fullScreenButton->hide();
479 if (m_volumeSliderContainer)
480 m_volumeSliderContainer->hide();
481 if (m_toggleClosedCaptionsButton && !page->theme()->hasOwnDisabledStateHandlingFor(MediaToggleClosedCaptionsButtonPart))
482 m_toggleClosedCaptionsButton->hide();
485 void MediaControlRootElement::updateStatusDisplay()
488 m_statusDisplay->update();
491 void MediaControlRootElement::loadedMetadata()
493 if (m_statusDisplay && m_mediaController->isLiveStream())
494 m_statusDisplay->hide();
499 void MediaControlRootElement::changedClosedCaptionsVisibility()
501 if (m_toggleClosedCaptionsButton)
502 m_toggleClosedCaptionsButton->updateDisplayType();
505 void MediaControlRootElement::changedMute()
507 m_panelMuteButton->changedMute();
508 if (m_volumeSliderMuteButton)
509 m_volumeSliderMuteButton->changedMute();
512 void MediaControlRootElement::changedVolume()
515 m_volumeSlider->setVolume(m_mediaController->volume());
518 #if ENABLE(TIZEN_FULLSCREEN_API)
519 void MediaControlRootElement::updateMediaControlScale()
521 if (!document()->page())
524 double scaleFactor = 1 / document()->page()->chrome()->contentsScaleFactor();
525 if (Settings* settings = document()->settings()) {
526 int compareWidth = (settings->deviceWidth() > settings->deviceHeight()) ? compareResolution.height() : compareResolution.width();
527 if (settings->deviceWidth() != compareWidth)
528 scaleFactor *= (settings->deviceWidth() / static_cast<double>(compareWidth));
531 m_panel->setInlineStyleProperty(CSSPropertyWebkitTransform, "scale(" + String::number(scaleFactor) + ", " + String::number(scaleFactor) + ")", false);
535 void MediaControlRootElement::enteredFullscreen()
537 m_isFullscreen = true;
539 if (m_mediaController->isLiveStream()) {
540 m_seekBackButton->hide();
541 m_seekForwardButton->hide();
542 m_rewindButton->show();
543 m_returnToRealTimeButton->show();
545 m_seekBackButton->show();
546 m_seekForwardButton->show();
547 m_rewindButton->hide();
548 m_returnToRealTimeButton->hide();
551 #if !ENABLE(TIZEN_FULLSCREEN_API)
552 m_panel->setCanBeDragged(true);
554 m_fullScreenButton->setIsFullscreen(true);
556 if (Page* page = document()->page()) {
557 page->chrome()->setCursorHiddenUntilMouseMoves(true);
560 #if !ENABLE(TIZEN_GSTREAMER_VIDEO)
561 startHideFullscreenControlsTimer();
565 void MediaControlRootElement::exitedFullscreen()
567 m_isFullscreen = false;
569 // "show" actually means removal of display:none style, so we are just clearing styles
570 // when exiting fullscreen.
571 // FIXME: Clarify naming of show/hide <http://webkit.org/b/58157>
572 m_rewindButton->show();
573 m_seekBackButton->show();
574 m_seekForwardButton->show();
575 m_returnToRealTimeButton->show();
577 #if !ENABLE(TIZEN_FULLSCREEN_API)
578 m_panel->setCanBeDragged(false);
580 m_fullScreenButton->setIsFullscreen(false);
582 // We will keep using the panel, but we want it to go back to the standard position.
583 // This will matter right away because we use the panel even when not fullscreen.
584 // And if we reenter fullscreen we also want the panel in the standard position.
585 m_panel->resetPosition();
587 #if ENABLE(TIZEN_FULLSCREEN_API)
588 m_panel->removeInlineStyleProperty(CSSPropertyWebkitTransform);
591 #if !ENABLE(TIZEN_GSTREAMER_VIDEO)
592 stopHideFullscreenControlsTimer();
596 void MediaControlRootElement::showVolumeSlider()
598 if (!m_mediaController->hasAudio())
601 if (m_volumeSliderContainer)
602 m_volumeSliderContainer->show();
605 bool MediaControlRootElement::shouldHideControls()
607 return !m_panel->hovered();
610 bool MediaControlRootElement::containsRelatedTarget(Event* event)
612 if (!event->isMouseEvent())
614 EventTarget* relatedTarget = static_cast<MouseEvent*>(event)->relatedTarget();
617 return contains(relatedTarget->toNode());
620 void MediaControlRootElement::defaultEventHandler(Event* event)
622 MediaControls::defaultEventHandler(event);
624 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
625 if (event->type() == eventNames().clickEvent && m_mediaController->hasVideo()) {
626 if (!containsRelatedTarget(event)) {
627 if (m_panel->isOpaque())
631 m_hideControlsTimer.startOneShot(timeWithoutMouseMovementBeforeHidingControls);
636 if (event->type() == eventNames().mouseoverEvent) {
637 if (!containsRelatedTarget(event)) {
638 m_isMouseOverControls = true;
639 if (!m_mediaController->canPlay()) {
641 if (shouldHideControls())
642 startHideFullscreenControlsTimer();
645 } else if (event->type() == eventNames().mouseoutEvent) {
646 if (!containsRelatedTarget(event)) {
647 m_isMouseOverControls = false;
648 stopHideFullscreenControlsTimer();
650 } else if (event->type() == eventNames().mousemoveEvent) {
651 if (m_isFullscreen) {
652 // When we get a mouse move in fullscreen mode, show the media controls, and start a timer
653 // that will hide the media controls after a 3 seconds without a mouse move.
655 if (shouldHideControls())
656 startHideFullscreenControlsTimer();
662 #if ENABLE(TIZEN_GSTREAMER_VIDEO)
663 void MediaControlRootElement::hideControlsTimerFired(Timer<MediaControlRootElement>*)
665 if (m_mediaController->paused())
668 if (!m_mediaController->hasVideo())
671 if (Page* page = document()->page())
672 page->chrome()->setCursorHiddenUntilMouseMoves(true);
677 void MediaControlRootElement::startHideFullscreenControlsTimer()
682 m_hideFullscreenControlsTimer.startOneShot(timeWithoutMouseMovementBeforeHidingControls);
685 void MediaControlRootElement::hideFullscreenControlsTimerFired(Timer<MediaControlRootElement>*)
687 if (m_mediaController->paused())
693 if (!shouldHideControls())
696 if (Page* page = document()->page())
697 page->chrome()->setCursorHiddenUntilMouseMoves(true);
702 void MediaControlRootElement::stopHideFullscreenControlsTimer()
704 m_hideFullscreenControlsTimer.stop();
708 #if ENABLE(VIDEO_TRACK)
709 void MediaControlRootElement::createTextTrackDisplay()
711 if (m_textDisplayContainer)
714 RefPtr<MediaControlTextTrackContainerElement> textDisplayContainer = MediaControlTextTrackContainerElement::create(document());
715 m_textDisplayContainer = textDisplayContainer.get();
717 // Insert it before the first controller element so it always displays behind the controls.
719 insertBefore(textDisplayContainer.release(), m_panel, ec, true);
722 void MediaControlRootElement::showTextTrackDisplay()
724 if (!m_textDisplayContainer)
725 createTextTrackDisplay();
726 m_textDisplayContainer->show();
729 void MediaControlRootElement::hideTextTrackDisplay()
731 if (!m_textDisplayContainer)
732 createTextTrackDisplay();
733 m_textDisplayContainer->hide();
736 void MediaControlRootElement::updateTextTrackDisplay()
738 if (!m_textDisplayContainer)
739 createTextTrackDisplay();
741 m_textDisplayContainer->updateDisplay();
746 const AtomicString& MediaControlRootElement::shadowPseudoId() const
748 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls"));
752 void MediaControlRootElement::bufferingProgressed()
754 // We only need to update buffering progress when paused, during normal
755 // playback playbackProgressed() will take care of it.
756 if (m_mediaController->paused())
757 m_timeline->setPosition(m_mediaController->currentTime());