Bug 170739

Summary: Add a preference for the media resource buffering time
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: NEW ---    
Severity: Normal CC: sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch achristensen: review-

Description Alex Christensen 2017-04-11 10:50:43 PDT
Add a preference for the media resource buffering time
Comment 1 Alex Christensen 2017-04-11 10:54:15 PDT
Created attachment 306833 [details]
Patch
Comment 2 Alex Christensen 2017-04-11 11:12:42 PDT
rdar://problem/31485485
Comment 3 Sam Weinig 2017-04-11 12:04:47 PDT
Comment on attachment 306833 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm:590
> +- (double)_mediaResourceMaximumBufferingTime

I think the suffix Duration, rather than Time, would be better.

> Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:251
> +    parameters.mediaResourceMaximumBufferingTime = Seconds(m_defaultPageGroup->preferences().mediaResourceMaximumBufferingTime());

Seems weird/wrong to have webpreferences affect WebProcess creation, since a single web process can have web pages with different webpreferences.  It also looks like you aren't handling the preference changing after the process is created.
Comment 4 Alex Christensen 2017-04-11 12:06:55 PDT
I agree that it's icky, but this is a consequence of the WebResourceLoader being process global in the WebProcess.  And it's only temporary, so I'll remove it soon.  I'll change the suffix, though.
Comment 5 Alex Christensen 2017-04-11 13:09:44 PDT
Created attachment 306843 [details]
Patch
Comment 6 Alex Christensen 2017-04-11 14:34:50 PDT
Created attachment 306851 [details]
Patch
Comment 7 Alex Christensen 2017-04-11 14:35:18 PDT
Comment on attachment 306851 [details]
Patch

This patch is a step in the wrong direction, but it will allow me to do local testing easier.