KhronosGroup/WebGL

Webgl texture using drm protected video

Hakai-Shin opened this issue · 2 comments

Is it possible to create webgl texture using drm protected video?

+1 I'm quite curious on the feasibility of this. Use cases include creating browser extensions that allow us to render Netflix videos in a 3D environment

Oops, sorry for missing this issue when it was initially filed.

It is not possible to create WebGL textures from protected videos. Using fragment shaders, it is possible to deduce the R, G, and B values of each texel even if CPU readbacks are prohibited, by varying the shader's execution time and performing a side-channel timing attack. There is no defense possible in the browser for this attack; multiple attempts have been made in the WebGL working group to define restricted-form shaders, but they've always been defeated. This side-channel attack is also what motivated adding CORS support to HTMLImageElement, and changing WebGL's rules so that only same-origin images and videos may be uploaded to textures.

As exciting as this functionality would be, unfortunately it's not feasible.