import { request } from '@wisdom-utils/utils';

const REQUEST_METHOD_GET = 'get';
const REQUEST_METHOD_POST = 'post';
// eslint-disable-next-line no-undef
const baseURI = typeof DUMI_TYPE !== 'undefined' && DUMI_TYPE === 'dumi' ? '/api' : '';
const CommonPath = '';

// 录像回放
export function videoPlayback(params) {
  return request({
    url: `${baseURI}${CommonPath}/pandavms/camera/playback`,
    method: REQUEST_METHOD_GET,
    params,
  });
}

// 根据时间轴时间选定 查看历史视频
export function newPlayback(params) {
  return request({
    url: `${baseURI}${CommonPath}/pandavms/camera/newpalyback`,
    method: REQUEST_METHOD_GET,
    params,
  });
}

// 云台控制
export function controlSlim(data) {
  return request({
    url: `${baseURI}${CommonPath}/pandavms/camera/control/slim`,
    method: REQUEST_METHOD_POST,
    data,
  });
}