feat: 接口管理模块连接测试
parent
87f6b46a40
commit
cd4590525c
@ -0,0 +1,43 @@
|
|||||||
|
import React, { useState, useEffect } from 'react';
|
||||||
|
import ReactPlayer from 'react-player';
|
||||||
|
|
||||||
|
//样式文件注意要加上
|
||||||
|
import 'video.js/dist/video-js.css';
|
||||||
|
import { Modal } from 'antd';
|
||||||
|
export type FormValueType = {
|
||||||
|
target?: string;
|
||||||
|
template?: string;
|
||||||
|
type?: string;
|
||||||
|
time?: string;
|
||||||
|
frequency?: string;
|
||||||
|
} & Partial<API.Device>;
|
||||||
|
|
||||||
|
export type VideoModalProps = {
|
||||||
|
modalOpen: boolean;
|
||||||
|
handleModal: () => void;
|
||||||
|
values: Partial<API.Device>;
|
||||||
|
reload: any;
|
||||||
|
videoServerParam: API.RtspRes;
|
||||||
|
};
|
||||||
|
|
||||||
|
const VideoModal: React.FC<VideoModalProps> = (props) => {
|
||||||
|
|
||||||
|
const videoUrl = 'rtsp://admin:@192.168.10.11';
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal title="播放视频" open={props.modalOpen}
|
||||||
|
width={1280}
|
||||||
|
onOk={props.handleModal} onCancel={props.handleModal}
|
||||||
|
footer={null}>
|
||||||
|
<ReactPlayer
|
||||||
|
url={videoUrl}
|
||||||
|
controls={true}
|
||||||
|
width="100%"
|
||||||
|
type ='audio/rtsp'
|
||||||
|
height="auto"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</Modal>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default VideoModal;
|
Loading…
Reference in New Issue