DiBV
DiBV

Reputation: 11

Is there a way to render DRM content with WebGL?

I'm currently trying to draw some DRM content with WebGL. I've already managed to draw normal and simple content without DRM but drawing DRM content only displays a black screen. I'm following these functions: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texSubImage2D in order to render my stuff. Does someone know why? Has someone tried this before? Thank you!

this._gl.bindTexture(this._gl.TEXTURE_2D, webGLTexture);

 this._gl.texSubImage2D(this._gl.TEXTURE_2D, 0, 0, 0, this._gl.RGBA,
        this._gl.UNSIGNED_BYTE, video);

 this._gl.bindTexture(this._gl.TEXTURE_2D, null);

Upvotes: 1

Views: 748

Answers (1)

Mick
Mick

Reputation: 25491

On many devices DRM will leverage a secure media path - this is designed to ensure that encrypted video content is decrypted and displayed directly to the screen without any other application, or even the OS, being able to access the decrypted video.

On some devices it is possible to do some basic manipulations to support, for example, VR but these will usually not allow any read option.

If your use case is to display DRM protected video inside a webGL created 'world' then this is possible on many/most devices - typically you would add a secure or protected view or window into your generated world and play the encrypted video in that view.

Upvotes: 1

Related Questions