Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widevine HLS #1903

Closed
dts-1504 opened this issue Aug 28, 2018 · 3 comments
Closed

Widevine HLS #1903

dts-1504 opened this issue Aug 28, 2018 · 3 comments

Comments

@dts-1504
Copy link

What do you want to do with Hls.js?
I want to play SAMPLE-AES encrypted HLS mpegts with Widevine DRM but I wonder if Hls.js supports it?
In this case, KEY tag will be like:

#EXT-X-KEY:METHOD=SAMPLE-AES,URI=”data:text/plain;base64,AAAAPXBzc2gA
AAAA7e+LqXnWSs6jyCfc1R0h7QAAAB0aDXdpZGV2aW5lX3Rlc3QiDHRlc3QgY29udGVud
A==”,KEYID=0x112233445566778899001122334455,KEYFORMAT=”urn:uuid:edef8
ba9-79d6-4ace-a3c8-27dcd51d21ed”,KEYFORMATVERSION=”1”

Ref: https://storage.googleapis.com/wvdocs/Widevine_DRM_HLS.pdf

What have you tried so far?
I already test encrypted HLS with raw key by placing "key.bin" in the same URL location as the playlist and it works fine.
In this case, KEY tag is like
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="key.bin",KEYFORMAT="identity",IV=0xF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF

Anyone tries SAMPLE-AES (CBCS) HLS with Winevide?

@OrenMe
Copy link
Collaborator

OrenMe commented Aug 28, 2018

HLS.JS has gotten support for EME supported playback with CENC Widevine lately. You can see here - https://github.com/video-dev/hls.js/blob/master/src/controller/eme-controller.js
You can check it out to see if it works for you.

@tchakabam
Copy link
Collaborator

tchakabam commented Aug 28, 2018

One of the streams in our demo is Shaka packager Widevine HLS (with fmp4 segments).

The only thing you should have to do is set the widevineLicenseServer URL in config.

Also, if your license server requires authentication (which is the usual meaningful case) then you can use licenseXhrSetup config callback to add the necessary request headers.

You can test it here if you select "Shaka-packager Widevine" in the test streams list: https://video-dev.github.io/hls.js/demo/

@dts-1504
Copy link
Author

Thanks for the help. Now I'm understanding that EME only supports fMP4 encrypted by CENC, it does not support MPEGTS encrypted by SAMPLE-AES.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants