While updating the mozconfig files for Android it turns out that ac_add_option --disable-eme does not work anymore.
We should investigate whether there is a suitable replacement and what the EME situation on Android is to make sure we still provide a DRM-free mobile experience.
Designs
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
Configuring mobile/android/ with --disable-eme results in:
0:01.23 Traceback (most recent call last): 0:01.23 File "/home/android/tor-browser/configure.py", line 132, in <module> 0:01.23 sys.exit(main(sys.argv)) 0:01.23 File "/home/android/tor-browser/configure.py", line 38, in main 0:01.23 sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure')) 0:01.23 File "/home/android/tor-browser/python/mozbuild/mozbuild/configure/__init__.py", line 441, in run 0:01.23 self._value_for(option) 0:01.23 File "/home/android/tor-browser/python/mozbuild/mozbuild/configure/__init__.py", line 528, in _value_for 0:01.23 return self._value_for_option(obj) 0:01.23 File "/home/android/tor-browser/python/mozbuild/mozbuild/util.py", line 947, in method_call 0:01.23 cache[args] = self.func(instance, *args) 0:01.23 File "/home/android/tor-browser/python/mozbuild/mozbuild/configure/__init__.py", line 591, in _value_for_option 0:01.23 % option_string.split('=', 1)[0]) 0:01.23 mozbuild.configure.options.InvalidOptionError: --disable-eme is not available in this configuration 0:01.27 *** Fix above errors and then restart with\ 0:01.27 "./mach build" 0:01.27 client.mk:111: recipe for target 'configure' failed 0:01.27 make: *** [configure] Error 1
--enable-eme only affects MOZ_EME_MODULES. The MODULES are only defined for browser. In FF67, enabling eme was restricted by OS, kernel, and CPU arch.
@depends(target)def eme_choices(target): if (target.kernel in ('Darwin', 'WINNT', 'Linux') and target.os not in ('Android', 'iOS') and target.cpu in ('x86', 'x86_64')): return ('widevine',) if target.kernel == 'WINNT' and target.cpu == 'aarch64': return ('widevine',)[snip]option('--enable-eme', nargs='+', choices=eme_choices, default=eme_default, when=eme_choices, help='{Enable|Disable} support for Encrypted Media Extensions')
The "choices" returned by eme_choices is false-ish (I assume) on Android and iOS, and configure errors as a result of this.
when = self._conditions.get(option) # If `when` resolves to a false-ish value, we always return None. # This makes option(..., when='--foo') equivalent to # option(..., when=depends('--foo')(lambda x: x)). if when and not self._value_for(when) and value is not None: # If the option was passed explicitly, we throw an error that # the option is not available. Except when the option was passed # from the environment, because that would be too cumbersome. if value.origin not in ('default', 'environment'): raise InvalidOptionError( '%s is not available in this configuration' % option_string.split('=', 1)[0]) self._logger.log(TRACE, '%r = None', option) return None
On Android, it's more interesting. #31880 didn't yield any interesting resultsbecause nothing is changed at compile-time. Fennec and GeckoView use the Androidsystem DRM support when it is available. This is controlled separately bymedia.mediadrm-widevinecdm.visible.