All Products
Search
Document Center

Live-to-VOD

Last Updated: Jul 11, 2019

Initialize a client

Initialize a client before using the SDK. For more information, see initVodClient.

Query a list of VOD files created from live streams

For more information about the request and response parameters, see ListLiveRecordVideo.

// Call example
var client = initVodClient('<Your AccessKey ID>','<Your AccessKey Secret>');

client.request("ListLiveRecordVideo", {
    StartTime: '2018-10-18T14:01:57Z',
    EndTime: '2018-10-20T14:01:57Z',
    StreamName: 'testStreamName',
    DomainName: 'testdomain.aliyun.com',
    AppName: 'AppName'
}, {}).then(function (response) {
    if (response.LiveRecordVideoList && response.LiveRecordVideoList.LiveRecordVideo){ 
        console.log('LiveRecordVideoList.size = ' + response.LiveRecordVideoList.LiveRecordVideo.length);
    }
    console.log('RequestId = ' + response.RequestId);
}).catch(function (response) {
    console.log('ErrorCode = ' + response.data.Code);
    console.log('ErrorMessage = ' + response.data.Message);
    console.log('RequestId = ' + response.data.RequestId);
});