import axios from "axios";

export const getVedio = async (rtspaddr: string) => {
  const res = await axios({
    method: "post",
    url: `http://58.17.42.179:90/vedios/api/third/Rtsp_VideoOpt?opt=getvideobyrtsp&rtspaddr=${rtspaddr}&type=flv`,
    headers: {
      Version: "v1",
      "Content-Type": "application/x-www-form-urlencoded",
    },
    data: {},
  });
  // console.log(res);

  if (res.data.data) {
    const { ws_url } = res.data.data;
    return ws_url;
  }
};
