问题描述
PutLiveChannel请求中Target节点的PlaylistName字段有误,包含不允许的/
字符。
问题原因
您发起了PutLiveChannel请求来创建一个LiveChannel,并在请求体XML中通过Target节点描述LiveChannel转储配置的各项参数,但是您提供的PlaylistName参数不符合接口要求。该参数用于指定生成的m3u8文件的名称。必须以.m3u8
结尾, 长度范围为[6, 128],且不能包含'/'
字符,默认值是playlist.m3u8
。
问题示例
比如您发起了如下请求:
PUT /test-channel?live HTTP/1.1
Date: Wed, 24 Aug 2016 11:11:28 GMT
Content-Length: xxx
Host: test-bucket.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="utf-8"?>
<LiveChannelConfiguration>
<Description />
<Status>enabled</Status>
<Target>
<Type>HLS</Type>
<FragDuration>2</FragDuration>
<FragCount>abc</FragCount>
<PlaylistName>my/playlist.m3u8</PlaylistName>
</Target>
<Snapshot>
<RoleName>role_for_snapshot</RoleName>
<DestBucket>bucketdest</DestBucket>
<NotifyTopic>notifyTopic</NotifyTopic>
<Interval>1</Interval>
</Snapshot>
</LiveChannelConfiguration
上述请求中Target节点的PlaylistName子节点值包含/
,不是符合接口要求,因此接口返回该错误。
解决方案
请确保请求体XML中Target节点各项参数符合接口要求,比如:
PUT /test-channel?live HTTP/1.1
Date: Wed, 24 Aug 2016 11:11:28 GMT
Content-Length: xxx
Host: test-bucket.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="utf-8"?>
<LiveChannelConfiguration>
<Description />
<Status>enabled</Status>
<Target>
<Type>HLS</Type>
<FragDuration>2</FragDuration>
<FragCount>3</FragCount>
<PlaylistName>myplaylist.m3u8</PlaylistName>
</Target>
<Snapshot>
<RoleName>role_for_snapshot</RoleName>
<DestBucket>snapshotdest</DestBucket>
<NotifyTopic>snapshotnotify</NotifyTopic>
<Interval>1</Interval>
</Snapshot>
</LiveChannelConfiguration
相关文档
文档内容是否对您有帮助?