本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
SPEKEAPIv2-实时工作流程方法调用示例
请求语法示例
以下URL是一个示例,并不表示固定格式:
POST https://speke-compatible-server/speke/v2.0/copyProtection
请求正文
一份CPIX文档。
请求标头
响应标头
名称 | Type | 发生次数 | 描述 |
---|---|---|---|
|
String |
1..1 |
用于标识密钥提供程序的字符串 |
|
String |
1..1 |
application/xml |
|
String |
1..1 |
SPEKEAPI与请求一起使用的版本,表述为 MajorVersion。 MinorVersion,比如 SPEKE v2.0 的 “2.0” |
请求响应
HTTP CODE | 负载名称 | 发生次数 | 描述 |
---|---|---|---|
|
CPIX |
1..1 |
DASH-CPIX 有效载荷响应 |
|
客户端错误消息 |
1..1 |
客户端错误描述 |
|
服务器错误消息 |
1..1 |
服务器错误描述 |
注意
本部分中的示例不包含内容密钥加密。有关如何添加内容密钥加密的信息,请参阅内容密钥加密。
带有明文密钥的实时示例请求负载
以下示例显示了从加密器到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: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:ContentKeyPeriodList>
<cpix:ContentKeyPeriod id="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f" index="1" />
</cpix:ContentKeyPeriodList>
<cpix:ContentKeyUsageRuleList>
<cpix:ContentKeyUsageRule kid="98ee5596-cd3e-a20d-163a-e382420c6eff" intendedTrackType="VIDEO">
<cpix:KeyPeriodFilter periodId="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f"/>
<cpix:VideoFilter />
</cpix:ContentKeyUsageRule>
<cpix:ContentKeyUsageRule kid="53abdba2-f210-43cb-bc90-f18f9a890a02" intendedTrackType="AUDIO">
<cpix:KeyPeriodFilter periodId="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f"/>
<cpix:AudioFilter />
</cpix:ContentKeyUsageRule>
</cpix:ContentKeyUsageRuleList>
</cpix:CPIX>
带有明文密钥的实时示例响应负载
以下示例显示了来自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:ContentKeyPeriodList>
<cpix:ContentKeyPeriod id="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f" index="1" />
</cpix:ContentKeyPeriodList>
<cpix:ContentKeyUsageRuleList>
<cpix:ContentKeyUsageRule kid="98ee5596-cd3e-a20d-163a-e382420c6eff" intendedTrackType="VIDEO">
<cpix:KeyPeriodFilter periodId="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f"/>
<cpix:VideoFilter />
</cpix:ContentKeyUsageRule>
<cpix:ContentKeyUsageRule kid="53abdba2-f210-43cb-bc90-f18f9a890a02" intendedTrackType="AUDIO">
<cpix:KeyPeriodFilter periodId="keyPeriod_0909829f-40ff-4625-90fa-75da3e53278f"/>
<cpix:AudioFilter />
</cpix:ContentKeyUsageRule>
</cpix:ContentKeyUsageRuleList>
</cpix:CPIX>