Various teams have expressed desire for a media element in worker context. This bug is placeholder for exploratory work before a formal intent-to-implement.
I have been hacking on supporting audio element in worker context by redefining HTMLMediaElement IDL: https://chromium-review.googlesource.com/c/562568/ I am at a stage where loader attempts to fetch the file url, but the media loader is tied with WebFrame. I have landed a few cleanup patches to untangle the loader from WebFrame: - https://chromium-review.googlesource.com/c/580671/ - https://chromium-review.googlesource.com/c/581610/ - https://chromium-review.googlesource.com/c/585232/ - https://chromium-review.googlesource.com/c/592152/
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7166d4dac3022723d3a9ff5ce163ab22a7871412 commit 7166d4dac3022723d3a9ff5ce163ab22a7871412 Author: Alok Priyadarshi <alokp@chromium.org> Date: Sat Jul 29 04:04:25 2017 Use unique_ptr instead of linked_ptr for MediaFactory::url_index_. Bug: 750311 Change-Id: I56480223e0d896660f4c98c477c6a245643e1d1b Reviewed-on: https://chromium-review.googlesource.com/591698 Reviewed-by: Fredrik Hubinette <hubbe@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Commit-Queue: Alok Priyadarshi <alokp@chromium.org> Cr-Commit-Position: refs/heads/master@{#490617} [modify] https://crrev.com/7166d4dac3022723d3a9ff5ce163ab22a7871412/content/renderer/media/media_factory.cc [modify] https://crrev.com/7166d4dac3022723d3a9ff5ce163ab22a7871412/content/renderer/media/media_factory.h [modify] https://crrev.com/7166d4dac3022723d3a9ff5ce163ab22a7871412/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/7166d4dac3022723d3a9ff5ce163ab22a7871412/media/blink/webmediaplayer_impl.h [modify] https://crrev.com/7166d4dac3022723d3a9ff5ce163ab22a7871412/media/blink/webmediaplayer_impl_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/999498de44d566344138f23949dcd8599ad79cf3 commit 999498de44d566344138f23949dcd8599ad79cf3 Author: Alok Priyadarshi <alokp@chromium.org> Date: Sat Aug 19 05:53:55 2017 Introduces media::ResourceFetchContext. This allows injecting a custom URL loader into ResourceMultiBufferDataProvider and also removes the direct dependency from UrlIndex/UrlData/ResourceMultiBufferDataProvider on WebLocalFrame. Bug: 750311 Change-Id: I017be4cc839d866b5dcdd3e5fab3131f2927f555 Reviewed-on: https://chromium-review.googlesource.com/587229 Commit-Queue: Alok Priyadarshi <alokp@chromium.org> Reviewed-by: Fredrik Hubinette <hubbe@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#495804} [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/content/renderer/media/media_factory.cc [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/content/renderer/media/media_factory.h [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/BUILD.gn [add] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/mock_resource_fetch_context.cc [add] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/mock_resource_fetch_context.h [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/multibuffer_data_source_unittest.cc [add] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/resource_fetch_context.h [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/resource_multibuffer_data_provider.cc [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/resource_multibuffer_data_provider.h [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/resource_multibuffer_data_provider_unittest.cc [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/url_index.cc [modify] https://crrev.com/999498de44d566344138f23949dcd8599ad79cf3/media/blink/url_index.h
https://chromium-review.googlesource.com/c/chromium/src/+/596489
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c1a13e6d90c44466043832e06d1ac4ec445ee105 commit c1a13e6d90c44466043832e06d1ac4ec445ee105 Author: Alok Priyadarshi <alokp@chromium.org> Date: Fri Sep 29 05:14:31 2017 Pass WorkerClients into WorkerThreadForTest::StartWithSourceCode. Also rearranges code so that WorkerThreadForTest can be defined in one place instead of having to declare FakeWorkerGlobalScope in between. No functional change is done here. Purley moving the code around. Split from https://chromium-review.googlesource.com/c/chromium/src/+/636684 Bug: 750311 Change-Id: Ic79600567401604651ad579542ee5aabbeb5fa5f Reviewed-on: https://chromium-review.googlesource.com/691301 Commit-Queue: Alok Priyadarshi <alokp@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Cr-Commit-Position: refs/heads/master@{#505299} [modify] https://crrev.com/c1a13e6d90c44466043832e06d1ac4ec445ee105/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cb960730c8e434249751a99a969f482354728771 commit cb960730c8e434249751a99a969f482354728771 Author: Alok Priyadarshi <alokp@chromium.org> Date: Mon Oct 02 07:24:20 2017 Makes ResourceFetcher histograms thread-safe. ResourceFetcher instances are created on both - main and worker threads. The static histograms used by ResourceFetcher instances are however thread unsafe. Bug: 750311 Change-Id: Ic0805e4d3e602edf7c469a8516a4e2635493b8d8 Reviewed-on: https://chromium-review.googlesource.com/693395 Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#505552} [modify] https://crrev.com/cb960730c8e434249751a99a969f482354728771/third_party/WebKit/Source/platform/Histogram.h [modify] https://crrev.com/cb960730c8e434249751a99a969f482354728771/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
Comment 1 by alokp@chromium.org
, Jul 28 2017