Commit 03fb7c97 authored by 程恺文's avatar 程恺文

修改

parent eb37a7f3
......@@ -22,7 +22,8 @@ class App extends React.Component {
if (VideoInfo.url) {
this.create(this.refs[`myVideo` + VideoInfo.id], `key`, JessibucaObj);
setTimeout(() => {
this.play(VideoInfo.url + `/${VideoInfo.dataRate == 'Sub' ? 2 : 1}`, `key`);
let code =window.independence?window.siteCode:(window.globalConfig?.userInfo?.LocalSite||localStorage.getItem('token'))
this.play(VideoInfo.url + `/${VideoInfo.dataRate == 'Sub' ? 2 : 1}?Civ_Site=${code}`, `key`);
}, 10);
}
}
......@@ -48,12 +49,12 @@ class App extends React.Component {
loadingText: '加载中',
debug: false,
recordType: 'mp4',
loadingTimeout: 60,
loadingTimeout: 10,
loadingText: '视频加载中',
loadingTimeoutReplay: true,
timeout: 60,
timeout: 10,
controlAutoHide: true,
heartTimeout: 60,
heartTimeout: 10,
heartTimeoutReplay: true,
showBandwidth: true, // 显示网速
operateBtns: {
......
......@@ -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 18:14:52
* @LastEditTime: 2023-05-30 11:08:31
* @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
*/
......@@ -37,7 +37,18 @@ const Demo1 = (props) => {
// protocol: '萤石EZOPEN',
//};
let VideoParam = {
let VideoParam ={
id: "9745259F-76B5-4ECB-BDD7-8B1B2C5C84CD",
name: "3L00AE9PAJ00034",
protocol: "乐橙云HTTP-FLV",
username: "lc0f4b952c86c34c4b",
password: "dfdcae9267bf4964ae09998e16f016",
pandavmsHost:'ws://192.168.12.154:8080/',
address: "3L00AE9PAJ00034"
}
/*{
id: '11F102BC-CE03-4E32-AE60-F297934DFE3F', // 398993BB-A795-4237-BE75-B6A7EC9D675
name: '琼海电信小区', // 设备名称
protocol:'萤石EZOPEN', // 萤石EZOPE 萤石HTTP-FLV RTSP GB28181
......@@ -48,7 +59,7 @@ const Demo1 = (props) => {
address: '236644034',
// width: 952,
// height: 500,
};
}; */
/* {
id: '398993BB-A795-4237-BE75-B6A7EC9D675', // 398993BB-A795-4237-BE75-B6A7EC9D675
......
......@@ -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 18:15:20
* @LastEditTime: 2023-05-30 14:38:18
* @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
*/
......@@ -97,10 +97,15 @@ const Video = (props, ref) => {
} catch (e) {}
});
};
const resizeUpdate = (e) => {
// 通过事件对象获取浏览器窗口的高度
setWidth(refs.current.offsetWidth);
setHeight(refs.current.offsetHeight);
// PlayersA?.stop?.()
console.log(PlayersA, '视频对象11111111111111111111111111111111111111111111111');
PlayersA.stop();
......@@ -119,8 +124,7 @@ const Video = (props, ref) => {
getToken();
}
// 页面刚加载完成后获取浏览器窗口的大小
setWidth(refs.current.offsetWidth);
setHeight(refs.current.offsetHeight);
// 页面变化时获取浏览器窗口的大小
window.addEventListener('resize', resizeUpdate);
......
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