import request from '@/utils/request'

// 查询直播视频列表
export function listLiveVideo(query) {
  return request({
    url: '/live/liveVideo/list',
    method: 'get',
    params: query
  })
}

// 查询直播视频详细
export function getLiveVideo(videoId) {
  return request({
    url: '/live/liveVideo/' + videoId,
    method: 'get'
  })
}

// 查询直播视频详细
export function getLiveVideoByLiveId(liveId) {
  return request({
    url: '/live/liveVideo/liveVideoByLiveId/' + liveId,
    method: 'get'
  })
}
// 查询直播视频详细
export function getLiveVideoByLiveIdAndType(liveId) {
  return request({
    url: '/live/liveVideo/preview/' + liveId,
    method: 'get'
  })
}

// 新增直播视频
export function addLiveVideo(data) {
  return request({
    url: '/live/liveVideo',
    method: 'post',
    data: data
  })
}

// 修改直播视频
export function updateLiveVideo(data) {
  return request({
    url: '/live/liveVideo',
    method: 'put',
    data: data
  })
}

// 删除直播视频
export function delLiveVideo(videoId) {
  return request({
    url: '/live/liveVideo/' + videoId,
    method: 'delete'
  })
}

// 导出直播视频
export function exportLiveVideo(query) {
  return request({
    url: '/live/liveVideo/export',
    method: 'get',
    params: query
  })
}
