直播转点播

本篇文档提供了Node.js SDK视频直播转点播模块,查询直转点视频列表功能的API调用示例。

初始化客户端

使用前请先初始化客户端,请参见初始化

查询直转点视频列表

调用ListLiveRecordVideo接口,完成查询直转点视频列表功能。

接口参数和返回字段请参见ListLiveRecordVideo。调用示例如下:

// 调用样例
var client = initVodClient('<Your AccessKeyId>','<Your AccessKeySecret>');

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);
});