Changeset 201882 in webkit


Ignore:
Timestamp:
Jun 9, 2016 2:01:55 PM (8 years ago)
Author:
jer.noble@apple.com
Message:

Pass through play state and toggle state to the WebPlaybackControlsManager
https://bugs.webkit.org/show_bug.cgi?id=158578
<rdar://problem/25045616>

Reviewed by Beth Dakin.

Pass through the isPlaying portion of setRate() and allow toggling when a model is present.

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::setRate):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r201881 r201882  
     12016-06-09  Jer Noble  <jer.noble@apple.com>
     2
     3        Pass through play state and toggle state to the WebPlaybackControlsManager
     4        https://bugs.webkit.org/show_bug.cgi?id=158578
     5        <rdar://problem/25045616>
     6
     7        Reviewed by Beth Dakin.
     8
     9        Pass through the isPlaying portion of setRate() and allow toggling when a model is present.
     10
     11        * platform/mac/WebPlaybackControlsManager.h:
     12        * platform/mac/WebPlaybackControlsManager.mm:
     13        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
     14        (WebCore::WebPlaybackSessionInterfaceMac::setRate):
     15        (WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
     16
    1172016-06-09  Frederic Wang  <fred.wang@free.fr>
    218
  • trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.h

    r200333 r201882  
    5050    BOOL _hasEnabledVideo;
    5151    float _rate;
     52    BOOL _playing;
     53    BOOL _canTogglePlayback;
    5254
    5355@private
     
    6264@property (readwrite) BOOL hasEnabledVideo;
    6365@property (nonatomic) float rate;
     66@property (getter=isPlaying) BOOL playing;
     67@property BOOL canTogglePlayback;
    6468
    6569- (void)setAudioMediaSelectionOptions:(const Vector<WTF::String>&)options withSelectedIndex:(NSUInteger)selectedIndex;
  • trunk/Source/WebCore/platform/mac/WebPlaybackControlsManager.mm

    r201687 r201882  
    3939@synthesize hasEnabledVideo=_hasEnabledVideo;
    4040@synthesize rate=_rate;
     41@synthesize playing=_playing;
     42@synthesize canTogglePlayback=_canTogglePlayback;
    4143
    4244- (AVValueTiming *)timing
  • trunk/Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm

    r201233 r201882  
    8989    WebPlaybackControlsManager* controlsManager = playBackControlsManager();
    9090    [controlsManager setRate:isPlaying ? playbackRate : 0.];
     91    [controlsManager setPlaying:isPlaying];
    9192
    9293    if (m_client)
     
    158159    manager.rate = m_playbackSessionModel->isPlaying() ? m_playbackSessionModel->playbackRate() : 0.;
    159160    manager.seekableTimeRanges = timeRangesToArray(m_playbackSessionModel->seekableRanges()).get();
     161    manager.canTogglePlayback = YES;
     162    manager.playing = m_playbackSessionModel->isPlaying();
    160163    [manager setAudioMediaSelectionOptions:m_playbackSessionModel->audioMediaSelectionOptions() withSelectedIndex:static_cast<NSUInteger>(m_playbackSessionModel->audioMediaSelectedIndex())];
    161164    [manager setLegibleMediaSelectionOptions:m_playbackSessionModel->legibleMediaSelectionOptions() withSelectedIndex:static_cast<NSUInteger>(m_playbackSessionModel->legibleMediaSelectedIndex())];
Note: See TracChangeset for help on using the changeset viewer.