Changeset 256377 in webkit


Ignore:
Timestamp:
Feb 11, 2020 2:53:08 PM (4 years ago)
Author:
youenn@apple.com
Message:

Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
https://bugs.webkit.org/show_bug.cgi?id=207325
<rdar://problem/59224810>

Reviewed by Eric Carlson.

Source/WebCore:

Manually tested and covered by API test.

  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

(WebCore::LibWebRTCProvider::webRTCAvailable):
Return true unconditionally on iOS since libwebrtc.dylib is always available.

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::TEST):
Add a test validating that RTCRtpSender.getCapabilities does not return null.

  • TestWebKitAPI/Tests/WebKit/getUserMedia.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r256372 r256377  
     12020-02-11  Youenn Fablet  <youenn@apple.com>
     2
     3        Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
     4        https://bugs.webkit.org/show_bug.cgi?id=207325
     5        <rdar://problem/59224810>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Manually tested and covered by API test.
     10
     11        * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
     12        (WebCore::LibWebRTCProvider::webRTCAvailable):
     13        Return true unconditionally on iOS since libwebrtc.dylib is always available.
     14
    1152020-02-11  Peng Liu  <peng.liu6@apple.com>
    216
  • trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp

    r254226 r256377  
    7474bool LibWebRTCProvider::webRTCAvailable()
    7575{
     76#if PLATFORM(IOS)
     77    return true;
     78#else
    7679    return !isNullFunctionPointer(rtc::LogMessage::LogToDebug);
     80#endif
    7781}
    7882
  • trunk/Tools/ChangeLog

    r256343 r256377  
     12020-02-11  Youenn Fablet  <youenn@apple.com>
     2
     3        Regression: RTCRtpSender.getCapabilities("video") returns null on iOS 13.4 (17E5223h)
     4        https://bugs.webkit.org/show_bug.cgi?id=207325
     5        <rdar://problem/59224810>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
     10        (TestWebKitAPI::TEST):
     11        Add a test validating that RTCRtpSender.getCapabilities does not return null.
     12        * TestWebKitAPI/Tests/WebKit/getUserMedia.html:
     13
    1142020-02-11  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm

    r253545 r256377  
    202202}
    203203
     204TEST(WebKit2, GetCapabilities)
     205{
     206    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
     207    auto processPoolConfig = adoptNS([[_WKProcessPoolConfiguration alloc] init]);
     208    auto preferences = [configuration preferences];
     209    preferences._mediaCaptureRequiresSecureConnection = NO;
     210    preferences._mediaDevicesEnabled = YES;
     211    preferences._mockCaptureDevicesEnabled = YES;
     212
     213    auto messageHandler = adoptNS([[GUMMessageHandler alloc] init]);
     214    [[configuration.get() userContentController] addScriptMessageHandler:messageHandler.get() name:@"gum"];
     215
     216    auto webView = [[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500) configuration:configuration.get() processPoolConfiguration:processPoolConfig.get()];
     217    auto delegate = adoptNS([[GetUserMediaCaptureUIDelegate alloc] init]);
     218    webView.UIDelegate = delegate.get();
     219
     220    wasPrompted = false;
     221
     222    [webView loadTestPageNamed:@"getUserMedia"];
     223    EXPECT_TRUE(waitUntilCaptureState(webView, _WKMediaCaptureStateActiveCamera));
     224
     225    TestWebKitAPI::Util::run(&wasPrompted);
     226
     227    done = false;
     228    [webView stringByEvaluatingJavaScript:@"checkGetCapabilities()"];
     229
     230    TestWebKitAPI::Util::run(&done);
     231}
     232
    204233#if WK_HAVE_C_SPI
    205234TEST(WebKit, WebAudioAndGetUserMedia)
  • trunk/Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html

    r253545 r256377  
    8888                }, 5000);
    8989            }
     90
     91            function checkGetCapabilities() {
     92                window.webkit.messageHandlers.gum.postMessage(RTCRtpSender.getCapabilities('video') != null ? "PASS" : "FAIL");
     93            }
     94
    9095        </script>
    9196    <head>
Note: See TracChangeset for help on using the changeset viewer.