生成DRM的播放许可证

最近更新时间:2019-07-24 15:17:48

1. 接口描述

接口请求域名: drm.tencentcloudapi.com 。

本接口用来生成DRM方案对应的播放许可证,开发者需提供DRM方案类型、内容类型参数,后台将生成许可证后返回许可证数据 开发者需要转发终端设备发出的许可证请求信息。

默认接口请求频率限制:200次/秒。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:CreateLicense
Version String 公共参数,本接口取值:2018-11-15
Region String 公共参数,本接口不需要传递此参数。
DrmType String DRM方案类型,接口取值:WIDEVINE,FAIRPLAY。
LicenseRequest String Base64编码的终端设备License Request数据。
ContentType String 内容类型,接口取值:VodVideo,LiveVideo。
Tracks.N Array of String 授权播放的Track列表。
该值为空时,默认授权所有track播放。
PlaybackPolicy PlaybackPolicy 播放策略参数。

3. 输出参数

参数名称 类型 描述
License String Base64 编码的许可证二进制数据。
ContentId String 加密内容的内容ID
RequestId String 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 请求示例

开发者使用该接口生成使用Fairplay方案的加密内容的播放许可证。

输入示例

https://drm.tencentcloudapi.com/?Action=CreateLicense
&DrmType=FAIRPLAY
&LicenseRequest=AAAAAQAAAACKyNwKOFI1D2xd5gghh/RrpszqioEfe1j4Ut2lgX0RwHy2qBwhlu+s9L6gbBXTWI/iJ02cNarB37Zo1/DuBVbhs0kokAj9ujOM1ztniI2jNe7U3wBOhWiiMFnU3794G+G173s4wq6kakbfx3swXE4bM5ovRFX4P4xH2zOPZfAG0h0ya3W9HhBuxdrKeLlii7nvpi5p6lzdlMwHULQJdAwzY5pwhgAAEuCjZsNRDHhz9O16FcwGjuNS5320s2L6Hvjv/Dx9uwdkiS8ZT3qo+pC7kl5nVCHMfgKmTKo8czamp5XRccKcAAMXHPzSLty5lBOs5eXYRzwTXlnVnQObp/kl2M3CKkXNyyvR+uvj/SfmYcDOyW4MdubOVJMXr25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7PVtOtJKpuysXB3Vd0kzyScfWT1ajIgtv/FaBRIkTeHuSuGyCUlaOrQqDOOPBO/Yx1pmOJp1dGktKC38orJL6iXQpeWp1BTUBhXYKagMiQUIymS1bDaGEJVsCFGEIuwYL6tXttdhZdJnQyVcv1W0rVjPwBMwuXj9nMm5wlPuGcEa+R7rAW/g88weulX0qo7O+VefSoCBlqPe1MdXBV25/lg+fQjolgkcH7rx+ptH+EmVhP582Yymbs61yB2BXdXu7n8hLJmy6i2+aUI4/2B0/EYiYTdBGrzLoYw+mCezKbeTS5FYIHnDrLusSdWpJ2wXCM3B8EDdvNSoyHsjNw2pDhmJ3pVfIGlIE84CirXPRRy1MYz5g3pcvlQUJZVsGvY5jmFxZBNeWv9sJdr8nqc5GmzUEAiLe5Gza8JijuD7zV13f7jzp2t6VYq3huFo3ocLfj/l1M+ja9joVT/uPC1tQOMmG2ggZahIAqQ1/u7KB06/s+Df9flKRhCFhvrPOPh7YrZs9aRQ7BtQV4nobXUhiQjz3++lm1qB9/txcBSss903RLzu7oIfaujVbedSm24H/BWjLxJdjClM6OiM8AYwzNl2Bm07C7xqB9sDvQ23LcOTGincHJU1Lvovj9NQwQufwKZMeiTeQStMbYJPEJJizONeKh5m0k18S1T82KGjUPUSWN3Vo7DawourkzRh8c+19BNBWTc9CJgslGezWmYYEoVzO6tekaAfUEJuh4xHXCU8ukiQvv5OxCxPAbAbN/RXddGwMf2y3M4NENxyiA+uZMTqd1NQ4RQzAPdQT+jwFXPSayKHd0oyZVM0nkPH4z4vHZmcriKEQfcPHTp719oPCdNKsBpFN0THh9XBZmna/anJm4iGI6XzbWxEt23elW6RgYbQiw==
&ContentType=LiveVideo
&<公共请求参数>

输出示例

{
  "Response": {
    "RequestId": "3c140219-cfe9-470e-b241-907877d6fb03",
    "ContentId": "twelve",
    "License": "AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAD7KZa2/J7Gz2f/tq584d8AQx6DemMJ5eHhfByaM8JupQHW7jkL8xOGXPzqzG2qsMV4i3e/LYQbJAavAKFN8qJnGLJjFfWIcbRVW8WPtwwgHPauRdU52H+r7fmup3TQP3oYYnOTYrQNhJI7Cu/VJqpfBRqBFl3kZvey9gVDoicp34/OwQVEXgWo+IiFc+R9a6ypQAzfZFQVkeVIQQcXTJso1R5rr0V1uv6Ygh7Z3RZDMpW0883z85C0auNkYp6VPPjIKKUHzkYsOXEcv1HEMp/Zow6VaAcKfqL0A/yIxvF1bzjNW24caxU8GuM1VLBCxE4yLtC2j8oKBWQaSv/zi1fsKca7hrF+RjPAo4euuleFWIbHezXfBdanAsfYPIav8uxkmppKpjA0sRQzx094CnXiAXaJDTbJun2fsZ+DzNlTZw21bVKybHIXzOKja/hgqxGaw5A7cuHG/UZG0VTbsujmWfbSWyWecMazvH3w5yNI+YXScFlcyuu5Zci3k6CgnEj3Le6/3LSjUSbRI+2SRjlMBUMJHb9+IKzUfgleZqwPqgJtPjRD1gK5Fifr4j1rO0hGNhQDjj23ax7xw7t2iXkyBFzL45pvq945jNZvtJQaiUofDeIlW/ubRyt5kfc1wl6+1xFyXXZ1eaPUXa1VcF4F5KNIF7THN68G82/0hmBf3yDjmgUhtbfPsNxxY44qIJSmxgZyz7+DScA2LP5qztSr/jNfU5UImzeLtpHq/HEqm6f+GwiWJMTKheLKP4CnNf1ITixhaIQSLXSDZkTP7tGc28nbDYQRlzRImv9vkwCHQujrf1zb0naLXhsKHSXc0/HBz2GvOMQ/0zztadRXc6cC4ds6XPtYJ4/+7lUGn4grjq0IbHxbzMITMaqHQq7V5xWp5AV+5OanopHdwKplheLSuaHavd2IF5OUzyYnWMws/XRW/rEPvqPDevgz2zO4azbh2oRn4GT0hdzRr16yifeRCOXv0/Z6ucnoF9D2A3qJjAeTH4/GV4VbfMVpaM2425A=="
  }
}

5. 开发者资源

API Explorer

该工具提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力,能显著降低使用云 API 的难度,推荐使用。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 描述
InternalError 内部错误。
InvalidParameter 参数错误。
InvalidParameterValue 参数取值错误。
UnknownParameter 未知参数错误。