Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
318 views
in Technique[技术] by (71.8m points)

javascript - 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);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...