[关闭]
@fuyb1986 2018-11-15T10:04:55.000000Z 字数 2126 阅读 547

获取直播教室的点播信息

儿童编程


直播结束15分钟以后可以查询到点播信息

获取直播信息

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
GET /server/classroom/video_record_list/ 获取视频列表 NO

Request Parameters

Name Description Required Default
stream_name 直播教室的 steam_name YES

cURL Example

  1. curl http://127.0.0.1:8000/server/classroom/video_record_list/?stream_name=xxxx

Response

  1. {
  2. "Total":1,
  3. "LiveRecordVideoList":{
  4. "LiveRecordVideo":[{
  5. "StreamName":"w3uly9gmran4777wmlwgl2uav7e22n93",
  6. "RecordStartTime":"2018-11-15T07:07:10Z",
  7. "AppName":"chengxuyuan-live",
  8. "PlaylistId":"7b4bde8dc4dc42cc84f522273dc7d53f",
  9. "DomainName":"live.coding61.com",
  10. "RecordEndTime":"2018-11-15T07:45:23Z",
  11. "Video":{
  12. "Status":"Normal",
  13. "Description":"w3uly9gmran4777wmlwgl2uav7e22n93|chengxuyuan-live|live.coding61.com",
  14. "Title":"w3uly9gmran4777wmlwgl2uav7e22n93",
  15. "CreationTime":"2018-11-15T07:48:24Z",
  16. "DownloadSwitch":"on",
  17. "TemplateGroupId":"d9856d92daa6f1426ef61edb7e616930",
  18. "CoverURL":"https://v.coding61.com/ae7dd4200dc44338be73c41bde6d32d5/0/32.jpg",
  19. "VideoId":"ae7dd4200dc44338be73c41bde6d32d5",
  20. "Snapshots":{
  21. "Snapshot":[
  22. "https://v.coding61.com/ae7dd4200dc44338be73c41bde6d32d5/1.jpg",
  23. ....
  24. ]},
  25. "CreateTime":"2018-11-15 15:48:24",
  26. "ModifyTime":"2018-11-15 15:54:12",
  27. "Duration":2291.132,
  28. "CustomerId":34608759,
  29. "Size":64223
  30. }
  31. }]
  32. }
  33. }

Response Data Description

这些信息有用和重要
Name Description
Total 视频个数,一般是一个
Video 每一个视频信息
Video.CoverURL 封面
Video.VideoId 视频 ID,用来获取 play auth
Video.Snapshots 视频的一些截图

获取视频播放权限

Method and URL Structure

Method Method Resource URL Descriptions Authentications Required
GET /server/classroom/video_record_list/ 获取播放权限 NO

Request Parameters

Name Description Required Default
video_id 视频 ID YES
stream_name 直播教室的 steam_name YES

cURL Example

  1. curl http://127.0.0.1:8000/server/classroom/video_record_list/?stream_name=xxxx&video_id=ae7dd4200dc44338be73c41bde6d32d5

Response

  1. {
  2. "PlayAuth":"eyJTZWN1...AuthTokenString",
  3. "VideoMeta":{
  4. "Status":"Normal",
  5. "Duration":2291.132080078125,
  6. "CoverURL":"https://v.coding61.com/ae7dd4200dc44338be735.jpg",
  7. "VideoId":"ae7dd4200dc44338be73c41bde6d32d5",
  8. "Title":"an4777wmlwgl2uav7e22n93"
  9. }
  10. }

Response Data Description

Name Description
PlayAuth 播放视频用的,300秒后过期,只能使用一次
VideoMeta.CoverURL 封面
VideoMeta.VideoId 视频 ID
Title 视频的标题,暂时不要用这个,用教室的标题
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注