Commit 960db6ae authored by 刘梦焕's avatar 刘梦焕

fix: merge

parents ad0e4e4d 85b4a188
......@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.9](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/videoslidermodal@1.1.8...@wisdom-components/videoslidermodal@1.1.9) (2023-05-17)
**Note:** Version bump only for package @wisdom-components/videoslidermodal
## [1.1.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/videoslidermodal@1.1.7...@wisdom-components/videoslidermodal@1.1.8) (2023-05-17)
**Note:** Version bump only for package @wisdom-components/videoslidermodal
......
{
"name": "@wisdom-components/videoslidermodal",
"version": "1.1.8",
"version": "1.1.9",
"description": "> TODO: description",
"author": "Liumh <liumh564@163.com>",
"homepage": "",
......@@ -31,7 +31,7 @@
},
"dependencies": {
"@babel/runtime": "^7.17.9",
"@wisdom-components/VmsVideo": "1.2.5",
"@wisdom-components/VmsVideo": "1.2.6",
"swiper": "^6.8.1"
}
}
......@@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/VmsVideo@1.2.5...@wisdom-components/VmsVideo@1.2.6) (2023-05-17)
### Bug Fixes
- 视频修改 ([0f6f19d](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/0f6f19da13b0da9170b6a6e1e86361d8bcea6fbc))
## [1.2.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/VmsVideo@1.2.4...@wisdom-components/VmsVideo@1.2.5) (2023-05-17)
### Bug Fixes
......
{
"name": "@wisdom-components/VmsVideo",
"version": "1.2.5",
"version": "1.2.6",
"description": "> TODO: description",
"author": "yutian <249303761@qq.com>",
"homepage": "",
......
......@@ -75,6 +75,7 @@ const Video = (props, ref) => {
PlayersA.pause = PlayersA.stop;
if (ref) ref.current = PlayersA;
})
.catch(function (error) {
console.log(error);
try {
......@@ -83,9 +84,25 @@ const Video = (props, ref) => {
});
};
if (VideoInfo.protocol != '萤石EZOPEN') {
useImperativeHandle(ref, () => {
// changeVal 就是暴露给父组件的方法, newVal是父组件传递的参数
return _video.current.jessibuca; // _video&& _video.current&&_video.current.jessibuca
});
} else {
getToken();
}
const CommonPath =
VideoInfo.gateway || window?.globalConfig?.hasGateWay ? 'PandaCore/GateWay/Video/' : ''; // 配置了gateway或者pc端web配置中有gateway
VideoInfo.url = VideoInfo.useFullUrl
? VideoInfo.fullUrl
: (VideoInfo.pandavmsHost || 'ws://' + location.host + '/') +
(VideoInfo.gateway ? CommonPath : '') +
'jessica/' +
VideoInfo.id;
let operateBtns = {
fullscreen: true,
screenshot: true,
......@@ -94,34 +111,16 @@ const Video = (props, ref) => {
audio: true,
};
useEffect(() => {
if (VideoInfo.protocol != '萤石EZOPEN') {
// eslint-disable-next-line react-hooks/rules-of-hooks
useImperativeHandle(ref, () => {
// changeVal 就是暴露给父组件的方法, newVal是父组件传递的参数
return _video.current.jessibuca; // _video&& _video.current&&_video.current.jessibuca
});
} else {
getToken();
}
VideoInfo.url = VideoInfo.useFullUrl
? VideoInfo.fullUrl
: (VideoInfo.pandavmsHost || 'ws://' + location.host + '/') +
(VideoInfo.gateway ? CommonPath : '') +
'jessica/' +
VideoInfo.id;
// eslint-disable-next-line react-hooks/exhaustive-deps
_VideoInfo = { ..._VideoInfo, ...VideoInfo };
if (JessibucaObj && JessibucaObj.operateBtns) {
JessibucaObj.operateBtns = {
...operateBtns,
...JessibucaObj.operateBtns,
};
}
_VideoInfo = { ..._VideoInfo, ...VideoInfo };
if (JessibucaObj && JessibucaObj.operateBtns) {
JessibucaObj.operateBtns = {
...operateBtns,
...JessibucaObj.operateBtns,
};
}
useEffect(() => {
return () => {
try {
PlayersA && PlayersA.stop();
......
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