全部产品
云市场

直播转点播

更新时间:2018-12-30 17:58:23

初始化客户端

使用前请先初始化客户端,参考 InitVodClient 接口。

查询直转点视频列表

接口参数和返回字段请参考 ListLiveRecordVideo

  1. package main
  2. import (
  3. "github.com/aliyun/alibaba-cloud-sdk-go/sdk"
  4. "github.com/aliyun/alibaba-cloud-sdk-go/services/vod"
  5. "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
  6. "fmt"
  7. )
  8. func MyListLiveRecordVideo(client *vod.Client) (response *vod.ListLiveRecordVideoResponse, err error) {
  9. request := vod.CreateListLiveRecordVideoRequest()
  10. request.StartTime = "2018-12-01T06:00:00Z"
  11. request.EndTime = "2018-12-25T06:00:00Z"
  12. request.StreamName = "testStreamName"
  13. request.AppName = "testAppName"
  14. request.PageNo = "1"
  15. request.PageSize = "10"
  16. request.SortBy = "CreationTime:Desc"
  17. request.AcceptFormat = "JSON"
  18. return client.ListLiveRecordVideo(request)
  19. }
  20. func main() {
  21. client, err := InitVodClient("<accessKeyId>", "<accessKeySecret>")
  22. if err != nil {
  23. panic(err)
  24. }
  25. response, err := MyListLiveRecordVideo(client)
  26. if err != nil {
  27. panic(err)
  28. }
  29. fmt.Println(response.GetHttpContentString())
  30. fmt.Println(response.RequestId)
  31. //videoList := response.LiveRecordVideoList
  32. }