You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.0 KiB
55 lines
1.0 KiB
# 视频管理
|
|
module AliyunVod::Service::VideoManage
|
|
# 修改视频信息
|
|
def update_video_info(video_id, **opts)
|
|
params = {
|
|
Action: 'UpdateVideoInfo',
|
|
VideoId: video_id
|
|
}.merge(base_params)
|
|
|
|
params = opts.merge(params)
|
|
|
|
result = request(:post, params)
|
|
|
|
result
|
|
end
|
|
|
|
# 获取视频信息
|
|
def get_video_info(video_id)
|
|
params = {
|
|
Action: 'GetVideoInfo',
|
|
VideoId: video_id
|
|
}.merge(base_params)
|
|
|
|
result = request(:post, params)
|
|
|
|
result
|
|
end
|
|
|
|
# 删除视频信息
|
|
def delete_video(video_ids)
|
|
params = {
|
|
Action: 'DeleteVideo',
|
|
VideoIds: video_ids.join(',')
|
|
}.merge(base_params)
|
|
|
|
result = request(:post, params)
|
|
|
|
result
|
|
end
|
|
|
|
# 视频播放数据
|
|
def video_data(video_id, start_time, end_time)
|
|
params = {
|
|
Action: 'DescribePlayVideoStatis',
|
|
VideoId: video_id,
|
|
StartTime: start_time,
|
|
EndTime: end_time,
|
|
}.merge(base_params)
|
|
|
|
puts params
|
|
result = request(:post, params)
|
|
|
|
result
|
|
end
|
|
end |