Changeset 200052 in webkit


Ignore:
Timestamp:
Apr 25, 2016 2:58:11 PM (8 years ago)
Author:
jer.noble@apple.com
Message:

WebKitPlaybackSessionModelMediaElement should initialize the interface added by setWebPlaybackSessionInterface() with initial data
https://bugs.webkit.org/show_bug.cgi?id=156996

Reviewed by Beth Dakin.

Notify the interface of the current values in the media element when the model is given an interface.

  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebPlaybackSessionModelMediaElement::setWebPlaybackSessionInterface):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r200047 r200052  
     12016-04-25  Jer Noble  <jer.noble@apple.com>
     2
     3        WebKitPlaybackSessionModelMediaElement should initialize the interface added by setWebPlaybackSessionInterface() with initial data
     4        https://bugs.webkit.org/show_bug.cgi?id=156996
     5
     6        Reviewed by Beth Dakin.
     7
     8        Notify the interface of the current values in the media element when the model is given an interface.
     9
     10        * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
     11        (WebPlaybackSessionModelMediaElement::setWebPlaybackSessionInterface):
     12
    1132016-04-25  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm

    r199593 r200052  
    6666    m_playbackSessionInterface = interface;
    6767
    68     if (m_playbackSessionInterface) {
    69         m_playbackSessionInterface->resetMediaState();
    70         if (m_mediaElement)
    71             m_playbackSessionInterface->setWirelessVideoPlaybackDisabled(m_mediaElement->mediaSession().wirelessVideoPlaybackDisabled(*m_mediaElement));
    72     }
     68    if (!m_playbackSessionInterface)
     69        return;
     70
     71    m_playbackSessionInterface->resetMediaState();
     72    if (!m_mediaElement)
     73        return;
     74
     75    m_playbackSessionInterface->setDuration(m_mediaElement->duration());
     76    m_playbackSessionInterface->setCurrentTime(m_mediaElement->currentTime(), [[NSProcessInfo processInfo] systemUptime]);
     77    m_playbackSessionInterface->setBufferedTime(m_mediaElement->maxBufferedTime());
     78    m_playbackSessionInterface->setRate(!m_mediaElement->paused(), m_mediaElement->playbackRate());
     79    m_playbackSessionInterface->setSeekableRanges(*m_mediaElement->seekable());
     80    m_playbackSessionInterface->setCanPlayFastReverse(m_mediaElement->minFastReverseRate() < 0.0);
     81    m_playbackSessionInterface->setWirelessVideoPlaybackDisabled(m_mediaElement->mediaSession().wirelessVideoPlaybackDisabled(*m_mediaElement));
     82    updateLegibleOptions();
    7383}
    7484
Note: See TracChangeset for help on using the changeset viewer.