Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 draw encrypted video frame to canvas (Encrypted Media Extensions with clearkey)

I am trying to draw frames from a HTML5 video element to a canvas using Javascript in which the video (webm VP9) has been encrypted with clearkey. I am using EME to decrypt it in Chrome. It appears that Chrome >= 55 does not allow CanvasContext2D.drawImage when using EME (Encrypted Media Extensions). The video itself is playing nicely, but I am not able to grab any frames.

Does anyone know a workaround for this issue?

like image 299
Peter Avatar asked Oct 28 '25 20:10

Peter


1 Answers

No, there is no workaround. If there was a way to read raw pixel data from an encrypted frame, it would make DRM pointless. Hence doing what you want is specifically disallowed.

like image 172
szatmary Avatar answered Oct 31 '25 10:10

szatmary