Changeset 116858 in webkit


Ignore:
Timestamp:
May 12, 2012 10:09:59 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Allow the platform media player to determine the media element's paused/playing status
https://bugs.webkit.org/show_bug.cgi?id=86235

Patch by Max Feil <mfeil@rim.com> on 2012-05-12
Reviewed by George Staikos.

Source/WebCore:

The platform media player needs to know when the HTMLMediaElement
is not paused. This is to address problems when switching
source element, which causes the destruction of the old
MediaPlayerPrivate object and construction of a new one. The
new one must resume playing ASAP if the old one was playing.

Test: media/media-continues-playing-after-replace-source.html

  • platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:

(WebCore::MediaPlayerPrivate::isElementPaused):
(WebCore):

  • platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:

(MediaPlayerPrivate):

LayoutTests:

This test replaces the source element of a playing media object
and makes sure the new source element begins playing.

  • media/media-continues-playing-after-replace-source-expected.txt: Added.
  • media/media-continues-playing-after-replace-source.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116856 r116858  
     12012-05-12  Max Feil  <mfeil@rim.com>
     2
     3        [BlackBerry] Allow the platform media player to determine the media element's paused/playing status
     4        https://bugs.webkit.org/show_bug.cgi?id=86235
     5
     6        Reviewed by George Staikos.
     7
     8        This test replaces the source element of a playing media object
     9        and makes sure the new source element begins playing.
     10
     11        * media/media-continues-playing-after-replace-source-expected.txt: Added.
     12        * media/media-continues-playing-after-replace-source.html: Added.
     13
    1142012-05-12  Zan Dobersek  <zandobersek@gmail.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r116857 r116858  
     12012-05-12  Max Feil  <mfeil@rim.com>
     2
     3        [BlackBerry] Allow the platform media player to determine the media element's paused/playing status
     4        https://bugs.webkit.org/show_bug.cgi?id=86235
     5
     6        Reviewed by George Staikos.
     7
     8        The platform media player needs to know when the HTMLMediaElement
     9        is not paused. This is to address problems when switching
     10        source element, which causes the destruction of the old
     11        MediaPlayerPrivate object and construction of a new one. The
     12        new one must resume playing ASAP if the old one was playing.
     13
     14        Test: media/media-continues-playing-after-replace-source.html
     15
     16        * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
     17        (WebCore::MediaPlayerPrivate::isElementPaused):
     18        (WebCore):
     19        * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
     20        (MediaPlayerPrivate):
     21
    1222012-05-12  Yury Semikhatsky  <yurys@chromium.org>
    223
  • trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp

    r114493 r116858  
    723723}
    724724
     725bool MediaPlayerPrivate::isElementPaused() const
     726{
     727    HTMLMediaElement* element = static_cast<HTMLMediaElement*>(m_webCorePlayer->mediaPlayerClient());
     728    if (!element || element->paused())
     729        return true;
     730    return false;
     731}
     732
    725733bool MediaPlayerPrivate::isTabVisible() const
    726734{
  • trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h

    r114493 r116858  
    133133
    134134    virtual bool isFullscreen() const;
     135    virtual bool isElementPaused() const;
    135136    virtual bool isTabVisible() const;
    136137    virtual int showErrorDialog(BlackBerry::Platform::MMRPlayer::Error);
Note: See TracChangeset for help on using the changeset viewer.