[simple_browser] Enables audio feature of web engine
Bug: 62409
You need to set like below to use the enabled services:
`fx set workstation.qemu-x64 --args 'use_chromium_canary=true' --with //src/media/playback/bundles:services --with-base //src/media/playback/bundles:audio_consumer_config`
Once mediaplayer is included to workstation by defualt, those --with
additions are not needed anymore (fxb/62453)
use_chrominum_canary=true arg might not be needed. It is just to make sure
the following fix is included:
https://chromium-review.googlesource.com/c/chromium/src/+/2481958
Change-Id: I6f1891b3c0b0d5086ee25bbf7be06b247ba098e2
Reviewed-on: https://fuchsia-review.googlesource.com/c/experiences/+/441795
Reviewed-by: Chase Latta <chaselatta@google.com>
Reviewed-by: Yuan Zhi <yuanzhi@google.com>
Testability-Review: Chase Latta <chaselatta@google.com>
Commit-Queue: Yeonhee Lee <yhlee@google.com>
diff --git a/bin/simple_browser/lib/create_web_context.dart b/bin/simple_browser/lib/create_web_context.dart
index cde8e3d..11ef856 100644
--- a/bin/simple_browser/lib/create_web_context.dart
+++ b/bin/simple_browser/lib/create_web_context.dart
@@ -17,9 +17,13 @@
contextProvider.ctrl.$serviceName,
contextProviderProxyRequest.passChannel());
final channel = Channel.fromFile('/svc');
+ final webFeatures = web.ContextFeatureFlags.network |
+ web.ContextFeatureFlags.audio |
+ web.ContextFeatureFlags.hardwareVideoDecoder |
+ web.ContextFeatureFlags.vulkan;
final web.CreateContextParams params = web.CreateContextParams(
serviceDirectory: InterfaceHandle<fidl_io.Directory>(channel),
- features: web.ContextFeatureFlags.vulkan);
+ features: webFeatures);
contextProvider.create(params, context.ctrl.request());
contextProvider.ctrl.close();