import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 开始一直播预览
 * @param query
 * post
 * /haikang/isup/stream/live/start?deviceId=2057338485989367810
 */
export const listDemo = (deviceId?: string | number) => {
  return request({
    url: `/haikang/isup/stream/live/start?deviceId=${deviceId}`,
    method: 'post'
  });
};

/**
 * 停止-直播预览
 * @param query
 * post
 * /haikang/isup/stream/live/stop?id=2057338485989367810&channel=1
 */
export const addDemo = (data: any) => {
  return request({
    url: '/haikang/isup/stream/live/stop',
    method: 'get',
    params: data
  });
};
