gingerbeur / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Can't get encrypted HLS to work over a local network #451

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Store encrypted HLS content on a local web server
2.Point Chromecast to the manifest
3.Load media

What is the expected output? What do you see instead?
I expect it to work as encrypted content is a basic HLS feature. It even used 
to work for me two months ago. But now I get host error 2.

 [  8.193s] [cast.player.api.Host] error 2 media_player.js:24Nb media_player.js:24Lb.kh media_player.js:24ob.log media_player.js:19z media_player.js:25L media_player.js:63Fe.Zg media_player.js:109
Fatal Error - 2

What version of the product are you using? On what operating system?
Using the latest Media Player Library, Chromecast firmware version is 22062.

Please provide any additional information below.
I played around with the MPL code trying to troubleshoot the problem. It boils 
down to the failure in the importKey. I changed the call to it to provide more 
information and here's what I get:
CHANGE THE CODE TO:
        window.crypto.subtle.importKey("raw", c, {
            name: "AES-CBC"
        }, !0, ["decrypt"]).catch(console.log.bind(console))

THE RESULT:
DOMException {message: "WebCrypto is only supported over secure origins. See 
http://crbug.com/373032", name: "NotSupportedError", code: 9, INDEX_SIZE_ERR: 
1, DOMSTRING_SIZE_ERR: 2…}code: 9message: "WebCrypto is only supported over 
secure origins. See http://crbug.com/373032"name: "NotSupportedError"__proto__: 
DOMException

If I'm not mistaken, it refuses to work until I serve the receiver from https. 
But I'm stillat the development stage, I don't have a server with valid SSL 
certificate (which is quite costly!)

Please advise, how are we supposed to work int internally with the encrypted 
content! 

Original issue reported on code.google.com by moshe.kr...@gmail.com on 14 Dec 2014 at 3:45

GoogleCodeExporter commented 9 years ago
Since encrypted HLS feature uses WebCrypto api for decrypting the video, the 
browser requires that the receiver app page is loaded over https. There is no 
way to get around it.

Original comment by vadi...@google.com on 15 Dec 2014 at 5:42

GoogleCodeExporter commented 9 years ago

Original comment by jonathan...@google.com on 15 Dec 2014 at 6:23

GoogleCodeExporter commented 9 years ago
Do you expect every developer to pay upfront for a CA issued certificate? Can I 
use self signed one?

Original comment by moshe.kr...@gmail.com on 15 Dec 2014 at 6:38

GoogleCodeExporter commented 9 years ago
You could use something like Google Compute Engine cloud storage, it has https 
enabled by default.

Original comment by vadi...@google.com on 15 Dec 2014 at 6:46