Skip to main content

Update channel

Service Address

http://api-az-cn.danghongyun.com/rest

Request Method

POST

Request Parameters

ParameterDescriptionTypeRequired
accessKey访问接口的accessKeyStringRequired
actionAPI name, this api is "liveUpdate"StringRequired
versionapi version,it must be at the moment 2.0StringRequired
signatureSignature generated by signature rule.StringRequired
timestampapi timestamps of the call,Invoke time in milliseconds since january 1 1970,eg 1466488681033StringRequired

in addition pass in the parameters modified by the live channel in the form of json in the body of the http packet and set the content type in the http header to application json the specific parameters are as follows

the name of the parameterRequireddescription
idtrueString, channel id
nametrueString, the name of the channel
signalTypetrueString,source stream type 1 push stream 2 pull stream
pullStreamfalseString,stream pulling address which is required if the source stream type is set to stream pulling
liveTypefalseInteger,live broadcast type 0 normal live broadcast 2 vr live broadcast 3 advanced live broadcast do not pass the default follow template type
typeNamefalseString, typeName
typefalseString, the type of channel(categorize your live streams id==typeid)
outputGroupList.idfalseString,output group id if not filled the original output group will be cleared and a new output group will be created if you want to keep the original playback address unchanged you must bring this id
outputGroupList.protocolTypetrueInteger,live output group protocol type 1 hls 2 rtmp
outputGroupList.rtmpThirdPartyOutputUrlfalseString,the third party ingest address can be optionally entered under the rtmp protocol
outputGroupList.rotationfalseString,the value of the screen rotation degree is 0 or 90 or 270
outputGroupList.isRecordfalseString,whether to enable recording 0 not enabled 1 enabled default 0
outputGroupList.needToMp4falseString,whether the recorded file is converted to mp4 0 no 1 yes default 0
outputGroupList.isTimeShiftfalseString,whether to enable time shift 0 not enabled 1 enabled default 0 time shifting can only be enabled under the hls protocol
outputGroupList.timeShiftDurationfalseString,time shifting duration which is required if time shifting is enabled(units hours)
outputGroupList.isLiveEncryptfalseString,whether encryption is enabled 0 not enabled 1 enabled default 0.encryption can only be enabled under the hls protocol
outputGroupList.logoIdfalseString,live broadcast logoId
outputGroupList.outputTemplateList.templateIdtrueString,live streaming templates id
outputGroupList.outputTemplateList.isDefaulttrueString,default or not 0 no 1 yes

Request Example

{
"id":"377fc5664a8a4af189d3cec73aef1d76",
"name": "test modify the normal channel",
"signalType": 1,
"liveType": 0,
"outputGroupList": [{
"protocolType": "1",
"isRecord": "1",
"isTimeShift": "1",
"timeShiftDuration": "2",
"isLiveEncrypt": "0",
"logoId": "",
"outputTemplateList": [{
"id":"0cc3b075ff2f49f7bd2bae698adee749",
"templateId": "786ee85ebb7c4dad8e75bc836a55a948",
"isDefault": "0"
},
{
"templateId": "6c01632990dc412b911cc7ba0b45885a",
"isDefault": "1"
}]
},
{
"protocolType": "2",
"isRecord": "1",
"outputTemplateList": [{
"templateId": "6c01632990dc412b911cc7ba0b45885a",
"isDefault": "1"
}]
}]
}

Response Example

{
"code": 0,
"message": "operation success",
"result": {
"id": "377fc5664a8a4af189d3cec73aef1d76",
"name": "test modify the normal channel",
"description": null,
"type": null,
"typeName": null,
"signalType": "1",
"stream": "p1u0enox_h27zhXg5",
"pullStream": null,
"pullTaskId": null,
"status": 0,
"streamStatus": 2,
"userId": 106,
"streamWidth": null,
"streamHeight": null,
"streamBitrate": null,
"streamAudioBitrate": null,
"streamFrameRate": null,
"createTime": 1542693039000,
"updateTime": 1542695148000,
"startTime": null,
"endTime": null,
"autoEndTime": null,
"thumbnailUrl": "http://p1u0enox.images.danghongyun.local/thumbnail/377fc5664a8a4af189d3cec73aef1d76.jpg",
"pushUrl": "rtmp://rtmp-push.danghongyun.dev/live/p1u0enox_h27zhXg5",
"publicPlayUrl": "rtmp://172.17.230.223/live/p1u0enox_h27zhXg5",
"publicFlvPlayUrl": "http://172.17.230.223:1936/live/p1u0enox_h27zhXg5.flv",
"liveType": 0,
"deviceId": null,
"fillInfo": null,
"outputGroupList": [{
"id": "049c1e882cea4faca68cfddcb54b845e",
"name": null,
"protocolType": 2,
"channelId": "377fc5664a8a4af189d3cec73aef1d76",
"taskId": null,
"isLiveEncrypt": null,
"customerId": null,
"contentId": null,
"createTime": 1542695148000,
"updateTime": 1542695148000,
"liveLogoId": null,
"liveLogo": null,
"logoId": null,
"rtmpThirdPartyOutputUrl": null,
"isRecord": "1",
"recordTaskId": null,
"recordStartTime": null,
"needToMp4": null,
"isTimeShift": null,
"timeShiftDuration": null,
"timeShiftTaskId": null,
"rotation": null,
"outputTemplateList": [{
"templateId": null,
"isDefault": null,
"id": "6c01632990dc412b911cc7ba0b45885a",
"displayName": "ordinary",
"transcodeType": 0,
"videoWidth": 640,
"videoHeight": 352,
"videoBitrate": 270,
"audioBitrate": 64,
"frameRate": 30,
"type": "2",
"userId": null,
"createTime": 2,
"updateTime": null,
"name": "ordinary/270kbps/640x352"
}],
"liveOutputs": [{
"id": "11c398e6e4a94bb8b0798128eb9ebc51",
"publicOutputUrl": "rtmp://172.17.230.223/live/p1u0enox_049c1e882cea4faca68cfddcb54b845e",
"videoWidth": 640,
"videoHeight": 352,
"videoBitrate": 270,
"audioBitrate": 64,
"protocolType": 2,
"userId": 106,
"channelId": "377fc5664a8a4af189d3cec73aef1d76",
"liveOutputGroupId": "049c1e882cea4faca68cfddcb54b845e",
"liveTemplateId": "6c01632990dc412b911cc7ba0b45885a",
"createTime": 1542695148000,
"updateTime": null,
"isDefault": "1"
}]
},
{
"id": "7327f98aca74472286b217f66ed8e3c0",
"name": null,
"protocolType": 1,
"channelId": "377fc5664a8a4af189d3cec73aef1d76",
"taskId": null,
"isLiveEncrypt": "0",
"customerId": null,
"contentId": null,
"createTime": 1542695148000,
"updateTime": 1542695148000,
"liveLogoId": "",
"liveLogo": null,
"logoId": null,
"rtmpThirdPartyOutputUrl": null,
"isRecord": "1",
"recordTaskId": null,
"recordStartTime": null,
"needToMp4": null,
"isTimeShift": "1",
"timeShiftDuration": "2",
"timeShiftTaskId": null,
"rotation": null,
"outputTemplateList": [{
"templateId": null,
"isDefault": null,
"id": "786ee85ebb7c4dad8e75bc836a55a948",
"displayName": "standard definition",
"transcodeType": 0,
"videoWidth": 720,
"videoHeight": 576,
"videoBitrate": 450,
"audioBitrate": 64,
"frameRate": 30,
"type": "2",
"userId": null,
"createTime": 3,
"updateTime": null,
"name": "standard definition/450kbps/720x576"
},
{
"templateId": null,
"isDefault": null,
"id": "6c01632990dc412b911cc7ba0b45885a",
"displayName": "ordinary",
"transcodeType": 0,
"videoWidth": 640,
"videoHeight": 352,
"videoBitrate": 270,
"audioBitrate": 64,
"frameRate": 30,
"type": "2",
"userId": null,
"createTime": 2,
"updateTime": null,
"name": "ordinary/270kbps/640x352"
}],
"liveOutputs": [{
"id": "2816f1bdbcf24214aa80faa1f880dd8e",
"publicOutputUrl": "http://p1u0enox.live1.danghongyun.local/live/hls/377fc5664a8a4af189d3cec73aef1d76/7327f98aca74472286b217f66ed8e3c0.m3u8",
"videoWidth": 640,
"videoHeight": 352,
"videoBitrate": 270,
"audioBitrate": 64,
"protocolType": 1,
"userId": 106,
"channelId": "377fc5664a8a4af189d3cec73aef1d76",
"liveOutputGroupId": "7327f98aca74472286b217f66ed8e3c0",
"liveTemplateId": "6c01632990dc412b911cc7ba0b45885a",
"createTime": 1542695148000,
"updateTime": null,
"isDefault": "1"
},
{
"id": "a1646f60bc05431d89f0d878372357ff",
"publicOutputUrl": "http://p1u0enox.live1.danghongyun.local/live/hls/377fc5664a8a4af189d3cec73aef1d76/7327f98aca74472286b217f66ed8e3c0.m3u8",
"videoWidth": 720,
"videoHeight": 576,
"videoBitrate": 450,
"audioBitrate": 64,
"protocolType": 1,
"userId": 106,
"channelId": "377fc5664a8a4af189d3cec73aef1d76",
"liveOutputGroupId": "7327f98aca74472286b217f66ed8e3c0",
"liveTemplateId": "786ee85ebb7c4dad8e75bc836a55a948",
"createTime": 1542695148000,
"updateTime": null,
"isDefault": "0"
}]
}]
},
"success": true
}

Response Fields

See Channel.