Commit 5a970e6b authored by 程恺文's avatar 程恺文

修改

parent 0ad69787
......@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com
* @Date: 2023-04-11 13:40:18
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-05-24 16:51:22
* @LastEditTime: 2023-05-24 18:14:52
* @FilePath: \wisdom-components\packages\base-components\TestVideo\src\demos\dmeo1.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -40,7 +40,7 @@ const Demo1 = (props) => {
let VideoParam = {
id: '11F102BC-CE03-4E32-AE60-F297934DFE3F', // 398993BB-A795-4237-BE75-B6A7EC9D675
name: '琼海电信小区', // 设备名称
protocol: '萤石EZOPEN', // 萤石EZOPE 萤石HTTP-FLV RTSP GB28181
protocol:'萤石EZOPEN', // 萤石EZOPE 萤石HTTP-FLV RTSP GB28181
username: '6c44c8e92d1c4d75a9818756025df550',
password: '78b7dc88f9f4bf19c2b1aabfdd995244',
dataRate: 'Sub', // Main 主码流 Sub 子码流
......@@ -86,11 +86,11 @@ const Demo1 = (props) => {
// ******
// 其他事件需查看在线文档
// ******
return ()=>{
return () => {
console.log('销毁。。。。。。。。。。。。。。。。。。。。。。。。。');
stopVideo()
}
stopVideo();
};
}, []);
const stopVideo = () => {
......
......@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com
* @Date: 2023-04-11 13:40:18
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-05-24 16:34:00
* @LastEditTime: 2023-05-24 18:15:20
* @FilePath: \wisdom-components\packages\base-components\VmsVideo\src\index.jsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -104,15 +104,17 @@ const Video = (props, ref) => {
// PlayersA?.stop?.()
console.log(PlayersA, '视频对象11111111111111111111111111111111111111111111111');
PlayersA.stop();
getToken();
getToken();
};
if (VideoInfo.protocol != '萤石EZOPEN') {
useImperativeHandle(ref, () => {
// changeVal 就是暴露给父组件的方法, newVal是父组件传递的参数
return _video.current.jessibuca; // _video&& _video.current&&_video.current.jessibuca
});
}
useEffect(() => {
if (VideoInfo.protocol != '萤石EZOPEN') {
useImperativeHandle(ref, () => {
// changeVal 就是暴露给父组件的方法, newVal是父组件传递的参数
return _video.current.jessibuca; // _video&& _video.current&&_video.current.jessibuca
});
} else {
getToken();
}
......@@ -129,8 +131,6 @@ const Video = (props, ref) => {
};
}, []);
const CommonPath =
VideoInfo.gateway || window?.globalConfig?.hasGateWay ? 'PandaCore/GateWay/Video/' : ''; // 配置了gateway或者pc端web配置中有gateway
......
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