本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
SPEKEAPIv2-VOD 工作流方法調用實例
請求語法範例
以下URL是範例,並不表示固定格式。
POST https://speke-compatible-server/speke/v2.0/copyProtection
請求內文
一CPIX份文件。
請求標頭
回應標頭
名稱 | Type | 發生 | 描述 |
---|---|---|---|
|
字串 |
1..1 |
識別金鑰提供者的字串 |
|
字串 |
1..1 |
application/xml |
|
字串 |
1..1 |
SPEKEAPI與請求一起使用的版本,制定為 MajorVersion. MinorVersion,就像 2.0 版的「2.0」一SPEKE樣 |
請求回應
HTTP CODE | 承載名稱 | 發生 | 描述 |
---|---|---|---|
|
CPIX |
1..1 |
DASH-CPIX 有效負載響應 |
|
用戶端錯誤訊息 |
1..1 |
用戶端錯誤描述 |
|
伺服器錯誤訊息 |
1..1 |
伺服器錯誤描述 |
注意
本節中的範例不包含內容金鑰加密。如需有關如何新增內容金鑰加密的資訊,請參閱內容金鑰加密。
VOD使用 Clear 中鍵的示例請求有效負載
下列範例顯示從加密程式傳送至DRM金鑰提供者的一般VOD要求承載,其中包含所有視訊軌道的一個內容金鑰,而所有音訊軌道的一個內容金鑰:
<cpix:CPIX contentId="abc123" version="2.3" xmlns:cpix="urn:dashif:org:cpix" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc"> <cpix:ContentKeyList> <cpix:ContentKey explicitIV="OFj2IjCsPJFfMAxmQxLGPw==" kid="98ee5596-cd3e-a20d-163a-e382420c6eff" commonEncryptionScheme="cbcs"></cpix:ContentKey> <cpix:ContentKey explicitIV="L6jzdXrXAFbCJGBuMrrKrG==" kid="53abdba2-f210-43cb-bc90-f18f9a890a02" commonEncryptionScheme="cbcs"></cpix:ContentKey> </cpix:ContentKeyList> <cpix:DRMSystemList> <!-- FairPlay --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"> <cpix:HLSSignalingData playlist="media"></cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master"></cpix:HLSSignalingData> </cpix:DRMSystem> <cpix:DRMSystem kid="53abdba2-f210-43cb-bc90-f18f9a890a02" systemId="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"> <cpix:HLSSignalingData playlist="media"></cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master"></cpix:HLSSignalingData> </cpix:DRMSystem> <!-- Widevine --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cpix:HLSSignalingData playlist="media"></cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master"></cpix:HLSSignalingData> <cpix:ContentProtectionData></cpix:ContentProtectionData> <cpix:PSSH></cpix:PSSH> </cpix:DRMSystem> <cpix:DRMSystem kid="53abdba2-f210-43cb-bc90-f18f9a890a02" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cpix:HLSSignalingData playlist="media"></cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master"></cpix:HLSSignalingData> <cpix:ContentProtectionData></cpix:ContentProtectionData> <cpix:PSSH></cpix:PSSH> </cpix:DRMSystem> <!-- Playready --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="9a04f079-9840-4286-ab92-e65be0885f95"> <cpix:HLSSignalingData playlist="media"></cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master"></cpix:HLSSignalingData> <cpix:ContentProtectionData></cpix:ContentProtectionData> <cpix:PSSH></cpix:PSSH> <cpix:SmoothStreamingProtectionHeaderData></cpix:SmoothStreamingProtectionHeaderData> </cpix:DRMSystem> <cpix:DRMSystem kid="53abdba2-f210-43cb-bc90-f18f9a890a02" systemId="9a04f079-9840-4286-ab92-e65be0885f95"> <cpix:HLSSignalingData playlist="media"></cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master"></cpix:HLSSignalingData> <cpix:ContentProtectionData></cpix:ContentProtectionData> <cpix:PSSH></cpix:PSSH> <cpix:SmoothStreamingProtectionHeaderData></cpix:SmoothStreamingProtectionHeaderData> </cpix:DRMSystem> </cpix:DRMSystemList> <cpix:ContentKeyUsageRuleList> <cpix:ContentKeyUsageRule kid="98ee5596-cd3e-a20d-163a-e382420c6eff" intendedTrackType="VIDEO"> <cpix:VideoFilter /> </cpix:ContentKeyUsageRule> <cpix:ContentKeyUsageRule kid="53abdba2-f210-43cb-bc90-f18f9a890a02" intendedTrackType="AUDIO"> <cpix:AudioFilter /> </cpix:ContentKeyUsageRule> </cpix:ContentKeyUsageRuleList> </cpix:CPIX>
VOD帶有 Clear 鍵的示例響應有效負載
下列範例顯示來自DRM金鑰提供者的典型回應裝載 (傳回值已縮短為 [...],以提高可讀性):
<cpix:CPIX contentId="abc123" version="2.3" xmlns:cpix="urn:dashif:org:cpix" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc"> <cpix:ContentKeyList> <cpix:ContentKey explicitIV="OFj2IjCsPJFfMAxmQxLGPw==" kid="98ee5596-cd3e-a20d-163a-e382420c6eff" commonEncryptionScheme="cbcs"> <cpix:Data> <pskc:Secret> <pskc:PlainValue>5dGAgwGuUYu4dHeHtNlxJw==</pskc:PlainValue> </pskc:Secret> </cpix:Data> </cpix:ContentKey> <cpix:ContentKey explicitIV="L6jzdXrXAFbCJGBuMrrKrG==" kid="53abdba2-f210-43cb-bc90-f18f9a890a02" commonEncryptionScheme="cbcs"> <cpix:Data> <pskc:Secret> <pskc:PlainValue>h3toSFIlyAYpfXVQ795m6x==</pskc:PlainValue> </pskc:Secret> </cpix:Data> </cpix:ContentKey> </cpix:ContentKeyList> <cpix:DRMSystemList> <!-- FairPlay --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"> <cpix:HLSSignalingData playlist="media">aHR0cHM6L[...]WZm</cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master">Y29tLmFwc[...]XJ5</cpix:HLSSignalingData> </cpix:DRMSystem> <cpix:DRMSystem kid="53abdba2-f210-43cb-bc90-f18f9a890a02" systemId="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"> <cpix:HLSSignalingData playlist="media">trBAnbMcj[...]u44</cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master">mn626PjyR[...]2fi</cpix:HLSSignalingData> </cpix:DRMSystem> <!-- Widevine --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cpix:HLSSignalingData playlist="media">Ifa2V5LWl[...]nNB</cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master">oIARIQeSI[...]Nd2l</cpix:HLSSignalingData> <cpix:ContentProtectionData>RoNd2lkZXZ[...]Nib</cpix:ContentProtectionData> <cpix:PSSH>AAAAanBzc[...]A==</cpix:PSSH> </cpix:DRMSystem> <cpix:DRMSystem kid="53abdba2-f210-43cb-bc90-f18f9a890a02" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"> <cpix:HLSSignalingData playlist="media">lTznjvtzL[...]GfJ</cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master">XgzdzQH7p[...]zeX</cpix:HLSSignalingData> <cpix:ContentProtectionData>TdgRnuJsZ[...]wDw</cpix:ContentProtectionData> <cpix:PSSH>mYZbjpWdS[...]D==</cpix:PSSH> </cpix:DRMSystem> <!-- Playready --> <cpix:DRMSystem kid="98ee5596-cd3e-a20d-163a-e382420c6eff" systemId="9a04f079-9840-4286-ab92-e65be0885f95"> <cpix:HLSSignalingData playlist="media">HicXmbZ2m[...]4==</cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master">GVzdCIfa2[...]Eta</cpix:HLSSignalingData> <cpix:ContentProtectionData>t7WwH24FI[...]YCC</cpix:ContentProtectionData> <cpix:PSSH>FFFFanBzc[...]A==</cpix:PSSH> <cpix:SmoothStreamingProtectionHeaderData>s5RrJ12HL[...]UBB</cpix:SmoothStreamingProtectionHeaderData> </cpix:DRMSystem> <cpix:DRMSystem kid="53abdba2-f210-43cb-bc90-f18f9a890a02" systemId="9a04f079-9840-4286-ab92-e65be0885f95"> <cpix:HLSSignalingData playlist="media">BptGzwis2[...]Iej</cpix:HLSSignalingData> <cpix:HLSSignalingData playlist="master">3c9SXdVa0[...]MBH</cpix:HLSSignalingData> <cpix:ContentProtectionData>HotJCMQyc[...]GpU</cpix:ContentProtectionData> <cpix:PSSH>S6UD43ybN[...]f==</cpix:PSSH> <cpix:SmoothStreamingProtectionHeaderData>VBFUv2or0[...]JeP</cpix:SmoothStreamingProtectionHeaderData> </cpix:DRMSystem> </cpix:DRMSystemList> <cpix:ContentKeyUsageRuleList> <cpix:ContentKeyUsageRule kid="98ee5596-cd3e-a20d-163a-e382420c6eff" intendedTrackType="VIDEO"> <cpix:VideoFilter /> </cpix:ContentKeyUsageRule> <cpix:ContentKeyUsageRule kid="53abdba2-f210-43cb-bc90-f18f9a890a02" intendedTrackType="AUDIO"> <cpix:AudioFilter /> </cpix:ContentKeyUsageRule> </cpix:ContentKeyUsageRuleList> </cpix:CPIX>