Changeset 228712 in webkit


Ignore:
Timestamp:
Feb 19, 2018 2:29:38 PM (6 years ago)
Author:
eric.carlson@apple.com
Message:

[Extra zoom mode] Don't allow PiP media playback
https://bugs.webkit.org/show_bug.cgi?id=182930
<rdar://problem/37676259>

Reviewed by Andy Estes.

Source/WebCore:

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Don't call setPIPModeEnabled:
if it isn't implemented.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode): Ditto.

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]): Don't enable PiP mode. Require user interaction for
all media types.

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r228710 r228712  
     12018-02-19  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Extra zoom mode] Don't allow PiP media playback
     4        https://bugs.webkit.org/show_bug.cgi?id=182930
     5        <rdar://problem/37676259>
     6
     7        Reviewed by Andy Estes.
     8
     9        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     10        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Don't call setPIPModeEnabled:
     11        if it isn't implemented.
     12        (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode): Ditto.
     13
    1142018-02-19  Antoine Quint  <graouts@apple.com>
    215
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r228709 r228712  
    709709
    710710#if PLATFORM(IOS)
    711     [m_videoLayer setPIPModeEnabled:(player()->fullscreenMode() & MediaPlayer::VideoFullscreenModePictureInPicture)];
     711    if ([m_videoLayer respondsToSelector:@selector(setPIPModeEnabled:)])
     712        [m_videoLayer setPIPModeEnabled:(player()->fullscreenMode() & MediaPlayer::VideoFullscreenModePictureInPicture)];
    712713#endif
    713714#else
     
    12291230{
    12301231#if PLATFORM(IOS)
    1231     [m_videoLayer setPIPModeEnabled:(mode & MediaPlayer::VideoFullscreenModePictureInPicture)];
     1232    if ([m_videoLayer respondsToSelector:@selector(setPIPModeEnabled:)])
     1233        [m_videoLayer setPIPModeEnabled:(mode & MediaPlayer::VideoFullscreenModePictureInPicture)];
    12321234    updateDisableExternalPlayback();
    12331235#else
  • trunk/Source/WebKit/ChangeLog

    r228711 r228712  
     12018-02-19  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Extra zoom mode] Don't allow PiP media playback
     4        https://bugs.webkit.org/show_bug.cgi?id=182930
     5        <rdar://problem/37676259>
     6
     7        Reviewed by Andy Estes.
     8
     9        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
     10        (-[WKWebViewConfiguration init]): Don't enable PiP mode. Require user interaction for
     11        all media types.
     12
    1132018-02-19  Ryan Haddad  <ryanhaddad@apple.com>
    214
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm

    r227984 r228712  
    175175
    176176#if PLATFORM(IOS)
     177#if !ENABLE(EXTRA_ZOOM_MODE)
    177178    _allowsPictureInPictureMediaPlayback = YES;
     179#endif
    178180    _allowsInlineMediaPlayback = WebCore::deviceClass() == MGDeviceClassiPad;
    179181    _inlineMediaPlaybackRequiresPlaysInlineAttribute = !_allowsInlineMediaPlayback;
    180182    _allowsInlineMediaPlaybackAfterFullscreen = !_allowsInlineMediaPlayback;
    181183    _mediaDataLoadsAutomatically = NO;
     184#if !ENABLE(EXTRA_ZOOM_MODE)
    182185    if (WebKit::linkedOnOrAfter(WebKit::SDKVersion::FirstWithMediaTypesRequiringUserActionForPlayback))
    183186        _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAudio;
    184187    else
     188#endif
    185189        _mediaTypesRequiringUserActionForPlayback = WKAudiovisualMediaTypeAll;
    186190    _ignoresViewportScaleLimits = NO;
Note: See TracChangeset for help on using the changeset viewer.