Bug 198585

Summary: -[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Jer Noble 2019-06-05 15:45:47 PDT
-[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
Comment 1 Jer Noble 2019-06-05 15:49:19 PDT
Created attachment 371442 [details]
Patch
Comment 2 Alex Christensen 2019-06-05 15:56:54 PDT
Comment on attachment 371442 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371442&action=review

> Tools/ChangeLog:12
> +        * TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-audio.html:

We should move this away from the WebKitLegacy directory since it's not just used for WebKitLegacy.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSuspendAllMediaPlayback.mm:60
> +    [webView performAfterReceivingMessage:@"playing" action:^() { isPlaying = true; }];

I think the () is unnecessary.
Comment 3 Jer Noble 2019-06-05 16:18:01 PDT
(In reply to Alex Christensen from comment #2)
> Comment on attachment 371442 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371442&action=review
> 
> > Tools/ChangeLog:12
> > +        * TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-audio.html:
> 
> We should move this away from the WebKitLegacy directory since it's not just
> used for WebKitLegacy.

There's not really a good general-purpose location for bundle resources. We should totally add one, but that's probably out-of-scope for this patch.

> > Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSuspendAllMediaPlayback.mm:60
> > +    [webView performAfterReceivingMessage:@"playing" action:^() { isPlaying = true; }];
> 
> I think the () is unnecessary.

Will change, in all the places this pattern appears.
Comment 4 Jer Noble 2019-06-05 16:23:25 PDT
Created attachment 371447 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2019-06-05 18:22:24 PDT
Comment on attachment 371447 [details]
Patch for landing

Clearing flags on attachment: 371447

Committed r246136: <https://trac.webkit.org/changeset/246136>
Comment 6 WebKit Commit Bot 2019-06-05 18:22:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-06-05 18:26:05 PDT
<rdar://problem/51464985>