cast.player.api.Host.licenseCustomData用法

时间:2014-08-14 13:15:01

标签: chromecast google-cast drm

我一直在尝试播放使用Smooth Streaming + PlayReady并需要自定义许可证数据的视频。我已经检查过它可以在Android和Silverlight播放器中播放。对于CHromecast,我需要使用CORS代理,因此URL略有不同(它包括CORS代理URL)。

要在Chromecast上播放该视频,我的代码基于https://github.com/googlecast/CastMediaPlayerStreamingDRM提供的示例,添加一些行来调用host.licenseCustomData。

1)添加到有效负载解析的行

... 
} else if(payload['type']==='licenseCredentials') {
    licenseCredentials = payload['value'];
    setDebugMessage('licenseCredentials', licenseCredentials);
} else if(payload['type']==='customData') {
    customData = payload['value'];
    setDebugMessage('customData', customData);

} else {
    licenseUrl = null;
}
...

2)添加到updateLicenseRequestInfo部分的行

...
if( licenseCredentials ) { 
    mediaHost.updateLicenseRequestInfo = function(requestInfo) {
      // example of setting CORS withCredentials
      requestInfo.withCredentials = true;
    };
  }

if (customData) {
  mediaHost.updateLicenseRequestInfo = function(requestInfo) {
  mediaHost.licenseCustomData=customData;
  console.log("### customData: "+customData);
  };
}

if( licenseUrl ) {
...

控制台日志显示customData具有我从发件人应用程序设置的值。

但是当我将调试工具连接到我的chromecast并启动应用程序并将视频网址与自定义数据一起发送到接收器时,从chromecast到许可证服务器的请求在soap信封中缺少字段CUSTOMDATA,这是我在Silverlight中播放视频时包含的内容。这使接收器抱怨“### HOST ERROR - 致命错误:代码= 2 mpl.js:639 获取密钥或解密内容时出错。 “

调用该方法时我做错了什么?是否在将customData发送到许可证服务器时使用该方法?

这是chromecast的soap请求:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
    <AcquireLicense xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols">
    <challenge>
        <Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/messages">
        <LA xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols" Id="SignedData" xml:space="preserve">
        <Version>1</Version>
        <ContentHeader>
            <WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.0.0.0">
            <DATA>
                <PROTECTINFO>
                    <KEYLEN>16</KEYLEN>
                    <ALGID>AESCTR</ALGID>
                </PROTECTINFO>
                <KID>Et0Diz60AUO2SbPZI2rnBw==</KID>
                <CHECKSUM>0NBYomW+Vu0=</CHECKSUM>
                <LA_URL>http://sldrm.licensekeyserver.com/core/rightsmanager.asmx</LA_URL>
                <LUI_URL>http://sldrm.licensekeyserver.com/core/rightsmanager.asmx?cid=xB9voVd%2fSkKDv1DGXA4RqQ%3d%3d</LUI_URL>
                <CUSTOMATTRIBUTES xmlns="">
                    <CID>a16f1fc4-7f57-424a-83bf-50c65c0e11a9</CID>
                    <DRMTYPE>smooth</DRMTYPE>
                </CUSTOMATTRIBUTES>
            </DATA>
        </WRMHEADER>
    </ContentHeader>
    <ClientInfo>
        <ClientVersion>1.2.0.1404</ClientVersion>
    </ClientInfo>
    <RevocationLists>
        <RevListInfo>
            <ListID>ioydTlK2p0WXkWklprR5Hw==</ListID>
            <Version>10</Version>
        </RevListInfo>
        <RevListInfo>
            <ListID>BOZ1zT1UnEqfCf5tJOi/kA==</ListID>
            <Version>11</Version>
        </RevListInfo>
        <RevListInfo>
            <ListID>Ef/RUojT3U6Ct2jqTCChbA==</ListID>
            <Version>13</Version>
        </RevListInfo>
    </RevocationLists>
    <LicenseNonce>Csbg/bANEEN+F/6qONjM1A==</LicenseNonce>
    <EncryptedData xmlns="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element">
    <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
    <EncryptionMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#ecc256"/>
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <KeyName>WMRMServer</KeyName>
</KeyInfo>
<CipherData>
    <CipherValue>TrI33EPlN0od88NhZgBAhWMG85DUb1PV4x7pBZDmwl0/vFIvl1CckuxAoRtVwNNVFlfiNiX6K1Q1nhX7DGXqOdA664CIK7/OwdlpBYb+9QXZMdgholjJMhLkxtjwLWQRW1wwA1w2H+1QqEJXcFUt/VbbO1d4iAUsvkDz2pBGyOQ=</CipherValue>
</CipherData>
</EncryptedKey>
</KeyInfo>
<CipherData>
    <CipherValue>rcN5+sUBEl1p32JE+xaQ9Qbc4LxoZcu5umSI2hTTjzfqr6h7uKJ/qbkvDWY/7sySI3MH9VMqieqKEy5aumh9gZyTqYiUsWM+UKIJGr7jT8GsvBnw41+04qISm4MfFdBE7Ch4goIQBENZ0onfE+v36LzZ/C5DTd0xV2tnvs7/fOHzUrQvvcrMKJYJ/NTLRXKVHg1h5O92iJrTzjKYKrgay6NbJJfVpcKc64tcMwoasn/ye0GD5VgNH2WU9fDUtV9t5UbVXwoEYiyfPx/cDvvXLwueZOTgZIHcYHHJ819tnM2nf7fxIWXKbHur0XkbKlxaggRnhYQzzJsuaoml1HKsP7urOpyCGD2PXwlcCRdCmCu25+p1pButUR1GAsVOP3jKhqTtF6AbA+vXIzQL/074u/On6mvqAGB63FSMJxVgx/LVu6IqbqqY/bS737K/UDAnyh2gEstcHucWCkIhArjmE1PMOg+0EdNWI6nPSPxeutZRxYr2G8vY8hBlogZPVIrakK1IFr6UiCdsK9zEr4r/R89EfV8OBcGWdEno+K5EvCDTRid+XW3aPZWtdKrhwPosl/F8pm+J4PwHV9fa8V9xF22v+fPvuUKX1ZmEIeey55705u1dKsM1pjuTmPCeoTd0ptAxeFhNi9D5b2+rXvGPiFBI0rKPmAK28zCa9VeeEBYIr0+tp1tZeYjnW4HGmCv5Cg+3bRAlD73AtvfSBrh3kbkaUjJMGiBvDuhrY5a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fKHbjemOc+vnUe9ceM5Cc3kOO0Ps7Ot99Hm1i3OfHUa5neGKISXgD6FkgI2znbCWTATfA51GiNS+ALNA6CLod2nDRWP9qjtgDezYKYIFtTaGy7kBuy6hwXNrdJG5Gr+jOJFIPbAxHDKViLxvTMdoiCh7ERTM948ssY5CM8Dk+HBLZVTym0L1YCesHKIOkoQOUG9iZbCadJgcJRuAXHaFXgDPC7KnBTqVxiaOkhSt0NrSKNc0FPO1Uy8Agwrw6O9iU1Qdx+GCbw0m1FzlCpoRnYj8Dm0z5oZ+H42I5MKpsYkZB8cZUGXuJOLGg+wZIhfool4UgrgTXjE1rALrLjw8dsSO9wi7IGOYoGcvKCwhEyGwJjh5/RPmrbOOzRvI6AJdYps+GBC7quZDYOjMhAUX/TKzi8QFZK+jMOjnIiVAYdmicgcRVT2fj5862c7cQVfVaq2Xv9QQFb/TGsY8ZvAv6RtAIu9gwP9Ld8mCSUIJWk7JWVkmODlFdhoMoW6nRnOJvEcAs6+sMGvG0arq6k6eTCk1uRg0agqtKy5Vzg80QEmJlwbfq2FXIR1osZ1ffDYO1znRrc7lx4FsGywgPZB8ehXTX6DhFtvHAbYrSYVE+kRVV9hp1DuSOoGmsnrFypKKBTjHvRpxeystdPxi8e6oMiiNJxpigspuRQ409qEw+jGFUIDyZ5UtvJ5lPfmH18xZZWSqTdobpH/1r2ESQVuT5xxNgmmIi6JJo7Uk+C1iNClVYkoIOYSoQV8FHjHHlkqf2OV8yHAjvvG7dYTmepWigE+fX4XPZtDMa5U0u+3kFG4k2rn4xuam/D7WtJYzKcMMPV5CroW3a1zyFZpczloflicUa+250ms5YRLOC+wXzZYKqIM3sC+Euoz3pEbTzlrlhOCyYEyAwTfJdJWNZU=</CipherValue>
</CipherData>
</EncryptedData>
</LA>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#ecdsa-sha256"/>
<Reference URI="#SignedData">
    <DigestMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#sha256"/>
    <DigestValue>XeX+gAycOTO5tO3lupyPCaZo4+mHqThZiwf9FoU0EAU=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>r8cshogs8x+4dxxTRuHeQ+pMgF8VnbSPXaEHf2la7dlnAPul6iKkWCbkiy7+OhNnR0aTDn+tJt+yJbgDeMyjdg==</SignatureValue>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyValue>
    <ECCKeyValue>
        <PublicKey>DNn77CHx0hdPgZvTNJgtS1Wc/6tVwas11asu+a6DEWSPEbLhDht7SbT67yqIpW11GclPbml/JhSblJsFURpd+Q==</PublicKey>
    </ECCKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
</Challenge>
</challenge>
</AcquireLicense>
</soap:Body>
</soap:Envelope>

这是来自Silverlight的那个:

<?xml version="1.0"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
    <AcquireLicense xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols">
    <challenge>
        <Challenge xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols/messages">
        <LA xmlns="http://schemas.microsoft.com/DRM/2007/03/protocols" Id="SignedData" xml:space="preserve">
        <Version>1</Version>
        <ContentHeader>
            <WRMHEADER xmlns="http://schemas.microsoft.com/DRM/2007/03/PlayReadyHeader" version="4.0.0.0">
            <DATA>
                <PROTECTINFO>
                    <KEYLEN>16</KEYLEN>
                    <ALGID>AESCTR</ALGID>
                </PROTECTINFO>
                <KID>Et0Diz60AUO2SbPZI2rnBw==</KID>
                <CHECKSUM>0NBYomW+Vu0=</CHECKSUM>
                <LA_URL>http://sldrm.licensekeyserver.com/core/rightsmanager.asmx</LA_URL>
                <LUI_URL>http://sldrm.licensekeyserver.com/core/rightsmanager.asmx?cid=xB9voVd%2fSkKDv1DGXA4RqQ%3d%3d</LUI_URL>
                <CUSTOMATTRIBUTES xmlns="">
                    <CID>a16f1fc4-7f57-424a-83bf-50c65c0e11a9</CID>
                    <DRMTYPE>smooth</DRMTYPE>
                </CUSTOMATTRIBUTES>
            </DATA>
        </WRMHEADER>
    </ContentHeader>
    <CLIENTINFO>
        <CLIENTVERSION>2.0.0.1446</CLIENTVERSION>
    </CLIENTINFO>
    <RevocationLists>
        <RevListInfo>
            <ListID>ioydTlK2p0WXkWklprR5Hw==</ListID>
            <Version>10</Version>
        </RevListInfo>
        <RevListInfo>
            <ListID>gC4IKKPHsUCCVhnlttibJw==</ListID>
            <Version>11</Version>
        </RevListInfo>
        <RevListInfo>
            <ListID>BOZ1zT1UnEqfCf5tJOi/kA==</ListID>
            <Version>12</Version>
        </RevListInfo>
        <RevListInfo>
            <ListID>Ef/RUojT3U6Ct2jqTCChbA==</ListID>
            <Version>22</Version>
        </RevListInfo>
    </RevocationLists>
    <CustomData>PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxLZXlPU0F1dGhlbnRpY2F0aW9uWE1MPjxEYXRhPjxQb2xpY3k+PEV4cGlyYXRpb25BZnRlckZpcnN0UGxheT4xPC9FeHBpcmF0aW9uQWZ0ZXJGaXJzdFBsYXk+PE1pbmltdW1TZWN1cml0eUxldmVsPjE1MDwvTWluaW11bVNlY3VyaXR5TGV2ZWw+PC9Qb2xpY3k+PFBsYXk+PEVuYWJsZXJzPjxJZD43ODY2MjdEOC1DMkE2LTQ0QkUtOEY4OC0wOEFFMjU1QjAxQTc8L0lkPjwvRW5hYmxlcnM+PC9QbGF5PjxHZW5lcmF0aW9uVGltZT4yMDEyLTEwLTAyIDE5OjIzOjExLjAwMDwvR2VuZXJhdGlvblRpbWU+PEV4cGlyYXRpb25UaW1lPjIwMTQtMTAtMDIgMTk6MjM6MTEuMDAwPC9FeHBpcmF0aW9uVGltZT48VW5pcXVlSWQ+NzViNWUyODBmMzlhNGRmNjgxMjAwZWVhMDcxNDQwNjU8L1VuaXF1ZUlkPjxSU0FQdWJLZXlJZD5kZjQwODc5MjY3ZmEyZmFlODE4YTlhM2JhN2E3MGViMjwvUlNBUHViS2V5SWQ+PC9EYXRhPjxTaWduYXR1cmU+RHJPK2pTN21aUVdmQWNpeE0yZmNVOU1UODNlMEhPSXhYOU1OQ2lZOXIvbzcrb0Q5cTFlU1M1Ymhvd0dsNDZWRlIrV1kwUnc4Yi85Y1ppQzY5NzZVZlAzRGN3bDdnYTVYWGJ2OU1jZW1pOExIUG92YnZWaFc3SmZBSmQ5OC8yQUllUURCSzNpbHdIVE9rVUF6aXllSUNBK2pQOExlRVRBTk1tcWljcFR0Z2hEQ0J3M0U0OU5LZFN1UDdyOWVMR1k5UVNpazhiUmdXb0pVdm5oYmtaMWJlcnR3bEN2eXY5RndRR2FvU0NZZTI3V1p6VzkwUkQ1Nkc3eU4xaWNtQkdCMGtxOXZNeWtJU016ZzNwZk41Q2ZQcUdSZjFJbit3TFY2bUJYUlJDSVFSMEJqWGxHQnIvSkJ1S0N4RE51M2k3bVJ5UHRCQmdJODU0RmZUZEU5Uk5kZkZnPT08L1NpZ25hdHVyZT48L0tleU9TQXV0aGVudGljYXRpb25YTUw+Cg==</CustomData>
    <LicenseNonce>SQDD6dIQNXVXLNKOCet2xQ==</LicenseNonce>
    <EncryptedData xmlns="http://www.w3.org/2001/04/xmlenc#" Type="http://www.w3.org/2001/04/xmlenc#Element">
    <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
    <EncryptionMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#ecc256"/>
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <KeyName>WMRMServer</KeyName>
</KeyInfo>
<CipherData>
    <CipherValue>8Kfzf28bYpkwzIBB1wZSQX+ZT7KS9EZL25Xs4pAto8ujqOufHz452VL/iJ5TRmWpf1+gjh0Wry3cg6lyiiZJnYMrDKQKwQJxiPoTk58Zc4FIGhrAJl5L3OobpYhOywJzRryB8TxkiNXeHW34E2PuduU50etksWHuPxJjSMlgbvE=</CipherValue>
</CipherData>
</EncryptedKey>
</KeyInfo>
<CipherData>
    <CipherValue>s0npwDOyyZXAb5AVl+oRUEWsXljJirYzOhvV+QoKvHz28yig+/dacUg0MDjZw4dwm9QjiRpQOwZCbyOjBAhIdoTSbAtHHmwvl6/J2iC3kAEtUCoCiiML3QAE8ydZa5ZlikhswWVZShksLXV+lWFK9rQX1jGxjTtRPNo2D4pMSp6F810MZwgfHZdXdLTTylgY1ixzIg4TjYz9lmBL0PS/xm0fG7+jHEh0te9cr4PDM2vBWo9tz0ysZVvFBMlkBrVYHmpCVs2zgyFVuh1pAvrhFPbljf143Me9dAJ9T6+SB5hEVgV0ezl3eGiHqv9P90hQJSq3KpIqEyNR04gKDe8vPrJcUw+Whn69JUnGKon6tHRcIZtf+lYYtiPluGusTetXa9NytOOqH8KLUiwgMscSa6/I6jBErPHF+nxBzFuB2xOKnw7RLU7bHU34Q/g/5Y29qwfjJxlvRnTG4oCTHx6JufBbGj+HwXi9LfY/nzH5A28sIEviQSseUuLtKVD2ax2idA/QLyS7g2Dj6nQWeRIX1s0PsGYKh38gqhvhJ+VDK0FP6w3j+NwmHxP7WVJ5vbTb0Ff0aiioz5lCapFCXo2PxkAzeEmgyI4L0jXbq3IWVCb9N0bbX1aYz0ZPsoX4ZKk+GKAztN2z2gif2xDo6CxnJPf2tdlbXCwDI5CKCsjQBTQQWcPF7Z0JBCiUWW0yM107cmGJ8sfzLG5RB/xsPnPZLzM6OW6OX8JiGYJxkNmqvqE5d0Lqa2ZKz4l4mLTjtIz0IFruCOFlzhm4S2Kd9em/GtALi5evApTsQDW8LoC0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Fm7yKh7aKUhWC8EGAZXNm5eu7dQ9w5AjrxePM7NERU2S</CipherValue>
</CipherData>
</EncryptedData>
</LA>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#ecdsa-sha256"/>
<Reference URI="#SignedData">
    <DigestMethod Algorithm="http://schemas.microsoft.com/DRM/2007/03/protocols#sha256"/>
    <DigestValue>YxEZEHdaee41melLgCquubdVrJwQu/elIajlsLl+FmQ=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>ooeQ9d4aPstpNo8j/zGo3Z0O0IQk9YHe7Pwh+UDTsqbVF4/BrKR2n5mV1T8ykp+2EAYQWmpc58kXuRKcrrcjWw==</SignatureValue>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyValue>
    <ECCKeyValue>
        <PublicKey>DnKjqSgywqA8mynNPAo1qzh0hE2ndzG5Fe39gGvlGIEEY7uamNYQAY9u0DTnevLgPmsGSDzrV8cZohBFr2exVw==</PublicKey>
    </ECCKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
</Challenge>
</challenge>
</AcquireLicense>
</soap:Body>
</soap:Envelope>

1 个答案:

答案 0 :(得分:1)

首先确保正在使用Media Player Library 0.9.0

// www.gstatic.com/cast/sdk/libs/mediaplayer/0.9.0/media_player.js

这是官方支持的版本。

其次我已经在

更新了代码

https://github.com/googlecast/CastMediaPlayerStreamingDRM

包含许可证自定义数据。现在,您可以从发送方设置许可证自定义数据,并使用远程调试在接收方侧查看。

请注意,需要设置mediaHost.licenseCustomData

  if (customData) {
    mediaHost.licenseCustomData=customData;
    console.log("### customData: "+customData);
  }

在调用mediaHost.updateLicenseRequestInfo之前,因为MPL在收到needkey事件时需要访问licenseCustomData,然后调用generateKeyRequest。