⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 187036 in webkit


Ignore:
Timestamp:
Jul 20, 2015, 2:37:18 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Allow video to rotate when app doesnt allow rotation.
https://bugs.webkit.org/show_bug.cgi?id=147121

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-07-20
Reviewed by Jer Noble.

Set an SPI bool on the fullscreen video root view controller to allow it to override app rotation restrictions.
This allows video to be played in landscape in portrait only apps.

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebVideoFullscreenInterfaceAVKit::setupFullscreen):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r187035 r187036  
     12015-07-20  Jeremy Jones  <jeremyj@apple.com>
     2
     3        Allow video to rotate when app doesnt allow rotation.
     4        https://bugs.webkit.org/show_bug.cgi?id=147121
     5
     6        Reviewed by Jer Noble.
     7
     8        Set an SPI bool on the fullscreen video root view controller to allow it to override app rotation restrictions.
     9        This allows video to be played in landscape in portrait only apps.
     10
     11        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
     12        (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
     13
    1142015-07-20  Andreas Kling  <akling@apple.com>
    215
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm

    r186764 r187036  
    898898@end
    899899
     900@interface UIViewController ()
     901@property (nonatomic, assign, setter=_setIgnoreAppSupportedOrientations:) BOOL _ignoreAppSupportedOrientations;
     902@end
     903
    900904void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer, const WebCore::IntRect& initialRect, UIView* parentView, HTMLMediaElementEnums::VideoFullscreenMode mode, bool allowsPictureInPicturePlayback)
    901905{
     
    917921        m_viewController = adoptNS([allocUIViewControllerInstance() init]);
    918922        [[m_viewController view] setFrame:[m_window bounds]];
     923        [m_viewController _setIgnoreAppSupportedOrientations:YES];
    919924        [m_window setRootViewController:m_viewController.get()];
    920925        [m_window makeKeyAndVisible];
Note: See TracChangeset for help on using the changeset viewer.