Commit 6eb489a4 authored by 李纪文's avatar 李纪文

fix: 修改视频回放

parent 18bb4760
......@@ -70,11 +70,11 @@ const Demo1 = (props) => {
// pandavmsHost: 'ws://221.229.200.85:8086/', // pandavms后端主机地址 eg: ws://172.16.19.19:8080/
// address: 'F65095407',
// channel: 2,
// options:{
// begin: '20231010000000',
// end: '20231010235959'
// options:{ // 不传递默认是今天的回放
// begin: '20231010000000', // 回放开始时间
// end: '20231010235959', // 回放结束时间
// },
// type:'rec'
// type:'rec', // 回放标识
// };
useEffect(() => {
......
......@@ -73,6 +73,7 @@ const Video = (props, ref) => {
});
PlayersA.pause = PlayersA.stop;
Players.current = PlayersA;
if (ref) ref.current = PlayersA;
};
......@@ -107,7 +108,7 @@ const Video = (props, ref) => {
useEffect(() => {
if (VideoInfo.protocol === '萤石EZOPEN' && VideoInfo.type === 'rec') {
VideoInfo.options && PlayersA && PlayersA.changePlayUrl(VideoInfo.options);
VideoInfo.options && Players && Players.current && Players.current.changePlayUrl(VideoInfo.options);
}
}, [VideoInfo.options]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment