Bug 198585 - -[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
Summary: -[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-05 15:45 PDT by Jer Noble
Modified: 2019-06-05 18:26 PDT (History)
4 users (show)

See Also:


Attachments
Patch (16.81 KB, patch)
2019-06-05 15:49 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (16.73 KB, patch)
2019-06-05 16:23 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>