NEW 193585
Add API for setting MediaCacheDirectory in WK Context Config.
https://bugs.webkit.org/show_bug.cgi?id=193585
Summary Add API for setting MediaCacheDirectory in WK Context Config.
Gurdal Oruklu
Reported 2019-01-18 12:18:50 PST
Just like local storage or application cache directories, it should be possible to set the media cache directory in WKContextConfiguration
Attachments
Patch (5.10 KB, patch)
2019-01-18 12:45 PST, Gurdal Oruklu
no flags
Patch (5.14 KB, patch)
2019-01-22 06:57 PST, Gurdal Oruklu
achristensen: review-
Gurdal Oruklu
Comment 1 2019-01-18 12:45:53 PST
Carlos Garcia Campos
Comment 2 2019-01-21 06:00:27 PST
I don't think we are going to add new C API unless it's required by WTR.
Michael Catanzaro
Comment 3 2019-01-21 12:33:33 PST
Comment on attachment 359528 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=359528&action=review That's true, we don't want to add new C API unless it's needed by the test runner, because the C API is neither public nor stable. But this patch *does* use it in the test runner. So I actually think this patch is fine. It needs to be approved by an owner, though. > Source/WebKit/ChangeLog:3 > + Add API for setting MediaCacheDirectory in WK Context Config. I would name this something like: "TestController should set media cache directory properly". Adding the new C API is uninteresting, because the C API is not public and applications cannot use it. It's just an implementation detail of WebKit. (I know Comcast has patched WebKit to expose the C API, but that's a bad idea.) But fixing the TestController to set the media cache directory is interesting. > Source/WebKit/ChangeLog:10 > + > + Only one blank line here. > Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp:131 > + > + Only one blank line here too. > Tools/ChangeLog:10 > + > + Juts one blank line here too. > Tools/WebKitTestRunner/TestController.cpp:462 > + WKContextConfigurationSetMediaCacheDirectory(configuration.get(), toWK(temporaryFolder + separator + "MediaCache").get()); Where is MediaCache being saved currently? Is this the only storage directory that TestController is missing here?
Xabier Rodríguez Calvar
Comment 4 2019-01-21 23:02:28 PST
Comment on attachment 359528 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=359528&action=review >> Tools/WebKitTestRunner/TestController.cpp:462 >> + WKContextConfigurationSetMediaCacheDirectory(configuration.get(), toWK(temporaryFolder + separator + "MediaCache").get()); > > Where is MediaCache being saved currently? > > Is this the only storage directory that TestController is missing here? That's managed, IIRC, in our media player private.
Gurdal Oruklu
Comment 5 2019-01-22 06:57:45 PST
Gurdal Oruklu
Comment 6 2019-01-22 06:59:07 PST
Updated the patch (removed extra lines and changed the description of the patch)
Michael Catanzaro
Comment 7 2019-01-22 08:48:27 PST
(In reply to Xabier Rodríguez Calvar from comment #4) > That's managed, IIRC, in our media player private. I don't understand, there's no code in the MediaPlayerPrivateGStreamer files related to MediaCache. Do you see a problem with this patch?
Alex Christensen
Comment 8 2019-01-22 14:37:58 PST
Comment on attachment 359732 [details] Patch This belongs in WKWebsiteDataStoreRef.h
Michael Catanzaro
Comment 9 2019-01-22 14:49:06 PST
Can you please explain why? Currently only service worker registration directory is exposed there; seems the other directories are all exposed in WKContextConfiguration.
Xabier Rodríguez Calvar
Comment 10 2019-01-23 23:37:38 PST
(In reply to Michael Catanzaro from comment #7) > I don't understand, there's no code in the MediaPlayerPrivateGStreamer files > related to MediaCache. Do you see a problem with this patch? No, what I mean is that there is code there to select where GStreamer is placing the cached files but so far we're not honoring anything coming from the API.
Xabier Rodríguez Calvar
Comment 11 2019-01-23 23:38:47 PST
(In reply to Michael Catanzaro from comment #7) > I don't understand, there's no code in the MediaPlayerPrivateGStreamer files > related to MediaCache. Do you see a problem with this patch? And no, I don't see any other problem with this patch other than GStreamer was and would be ignoring it.
youenn fablet
Comment 12 2019-01-24 07:22:10 PST
(In reply to Michael Catanzaro from comment #9) > Can you please explain why? Currently only service worker registration > directory is exposed there; seems the other directories are all exposed in > WKContextConfiguration. We are trying to move such APIs to WKWebsiteDataStoreRef. The principle is that a context might have pages that relate to different website data store through their session ids.
Note You need to log in before you can comment on or make changes to this bug.