Changeset 259388 in webkit


Ignore:
Timestamp:
Apr 2, 2020 8:59:55 AM (4 years ago)
Author:
eric.carlson@apple.com
Message:

[iOS] Allow WebKit to use camera in multi-tasking mode
https://bugs.webkit.org/show_bug.cgi?id=209904

Reviewed by Youenn Fablet.

Source/WebCore:

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::setupSession):

Source/WebCore/PAL:

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r259387 r259388  
     12020-04-02  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [iOS] Allow WebKit to use camera in multi-tasking mode
     4        https://bugs.webkit.org/show_bug.cgi?id=209904
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * platform/mediastream/mac/AVVideoCaptureSource.mm:
     9        (WebCore::AVVideoCaptureSource::setupSession):
     10
    1112020-04-02  Antoine Quint  <graouts@apple.com>
    212
  • trunk/Source/WebCore/PAL/ChangeLog

    r259373 r259388  
     12020-04-02  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [iOS] Allow WebKit to use camera in multi-tasking mode
     4        https://bugs.webkit.org/show_bug.cgi?id=209904
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * pal/cocoa/AVFoundationSoftLink.h:
     9        * pal/cocoa/AVFoundationSoftLink.mm:
     10
    1112020-04-01  Timothy Horton  <timothy_horton@apple.com>
    212
  • trunk/Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.h

    r259303 r259388  
    296296SOFT_LINK_CONSTANT_FOR_HEADER(PAL, AVFoundation, AVAudioSessionRouteChangeReasonKey, NSString *)
    297297#define AVAudioSessionRouteChangeReasonKey PAL::get_AVFoundation_AVAudioSessionRouteChangeReasonKey()
    298 #endif //  PLATFORM(IOS_FAMILY)
     298#endif // PLATFORM(IOS_FAMILY)
     299
     300#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
     301SOFT_LINK_FUNCTION_FOR_HEADER(PAL, AVFoundation, AVCaptureSessionSetAuthorizedToUseCameraInMultipleForegroundAppLayout, void, (AVCaptureSession *session), (session))
     302#define AVCaptureSessionSetAuthorizedToUseCameraInMultipleForegroundAppLayout softLink_AVFoundation_AVCaptureSessionSetAuthorizedToUseCameraInMultipleForegroundAppLayout
     303#endif // PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
    299304
    300305#endif // USE(AVFOUNDATION)
  • trunk/Source/WebCore/PAL/pal/cocoa/AVFoundationSoftLink.mm

    r259303 r259388  
    221221#endif
    222222
     223#if PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
     224SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, AVFoundation, AVCaptureSessionSetAuthorizedToUseCameraInMultipleForegroundAppLayout, void, (AVCaptureSession *session), (session))
     225#endif // PLATFORM(IOS_FAMILY) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
     226
    223227#endif // USE(AVFOUNDATION)
  • trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm

    r258255 r259388  
    396396
    397397    m_session = adoptNS([PAL::allocAVCaptureSessionInstance() init]);
     398#if PLATFORM(IOS_FAMILY)
     399    AVCaptureSessionSetAuthorizedToUseCameraInMultipleForegroundAppLayout(m_session.get());
     400#endif
    398401    [m_session addObserver:m_objcObserver.get() forKeyPath:@"running" options:NSKeyValueObservingOptionNew context:(void *)nil];
    399402
Note: See TracChangeset for help on using the changeset viewer.