[Bug 20992] EME should define or reference a platform-independent VM in which CDMs will run

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20992

Henri Sivonen <hsivonen@iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsivonen@iki.fi

--- Comment #2 from Henri Sivonen <hsivonen@iki.fi> ---
(In reply to comment #0)
> A platform-independent VM could be included either by
> reference to an existing standard (e.g. Java or .NET) or by
> defining a new VM.

I object to using DRM as a pretext to make the Web Platform dependent on a
massive additional execution environment that's strongly affiliated with a
single vendor (Java, .NET or NaCl). The Web already has a standards
body-defined VM that has multiple independent implementations: JS.

> If a single VM cannot be agreed upon,
> another option would be to allow several different VMs.

That's not particularly great compared to several different CDMs.

> If a new VM was to be defined, one approach would be to use
> ECMAScript + Typed Arrays as the VM. This would be
> advantageous in that many browsers already have very good
> ECMAScript VMs. 

Using asm.js (http://asmjs.org/spec/latest/) in a Web Worker with a
special-purpose global scope that provides integration points into the <video>
pipeline would make much more sense than relying on Java, .NET or NaCl. asm.js
performance as implemented in OdinMonkey is currently roughly half as fast as
native compilation of the same C code, so the performance of asm.js is already
in the Java/.NET ballpark.

> A binary encoding for ECMAScript (or a
> subset thereof) could be defined to help satisfy CDM providers'
> concerns for obfuscation. Existing browsers could easily
> translate this binary encoding to standard ECMAScript, or bypass
> the textual representation and convert it directly to their own
> internal representations of compiled ECMAScript.

Gzipped JS is an easily translatable binary representation of JS. Another
binary representation is not worthwhile, because if the mapping from the binary
representation to the normal representation is known, it wouldn't really
provide true obfuscation, as it would be possible to provide tools that
translate the primary representation to the normal representation.

> Any CDM implemented on a platform-independent VM will
> inevitably need to access native services. 

If the input the the Worker is the bytes of an ISO Common Encryption file and
the key messages of the nature outlined in EME, the output can be buffers
representing frames or audio samples without any access to native services.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 18 February 2013 06:21:05 UTC