two1stnamz
two1stnamz

Reputation: 626

Widevine Video Playback

The chromecast sdk states that widevine content is supported. Through testing I determined that the widevine browser plugin is not installed on the browser running on a chromecast device. Knowing that, how does one play widevine video content using the chromecast sdk? I'm running down the path of working with subclassing MediaProtocolMessageStream and trying to figure out what ContentMetaData needs to be passed to loadMedia(). Any guidance would be great!

Upvotes: 2

Views: 1818

Answers (1)

Ali Naddaf
Ali Naddaf

Reputation: 19034

Currently, you have to write your own (javascript) player from scratch to support DRM content, including widevine. The chrome browser (in Chromecast devices) supports EME so you can take advantage of that.

To further clarify, here is a very high level process that needs to happen: you need to register a listener with the video element for the "needkey" event which will be fired when a protected content is detected by the browser. Then you have to call video.generateKeyRequest(..) and pass the appropriate "key system" and "initialization data" (initData). The needkey event contains initData but applications can modify this before calling the generateKeyRequest(). After going through the content decryption module (CDM), browser fires a "keymessage" event that contains the request key that the application needs to capture and send to the license server. If all goes fine, the license server returns a key that application should then pass to the browser by calling video.addKey(). Browser will pass this key to the Content Decryption Module (CDM) to be used for decrypting frames that are passed to it.

Upvotes: 1

Related Questions