Commit 3f56d365 authored by 李纪文's avatar 李纪文

fix: 修改视频vms

parent 6c69d9a9
...@@ -77,18 +77,24 @@ const Video = (props, ref) => { ...@@ -77,18 +77,24 @@ const Video = (props, ref) => {
}; };
const videoPlayRec = (accessToken) => { const videoPlayRec = (accessToken) => {
let url = `ezopen://open.ys7.com/${VideoInfo.address}/${VideoInfo.channel || 1}.hd.rec`;
const begin = VideoInfo?.options?.begin || '';
const end = VideoInfo?.options?.end || '';
if (begin && end)
url = `ezopen://open.ys7.com/${VideoInfo.address}/${
VideoInfo.channel || 1
}.hd.rec?begin=${begin}&end=${end}`;
PlayersA = new EZUIKit.EZUIKitPlayer({ PlayersA = new EZUIKit.EZUIKitPlayer({
id: keyID, // 视频容器ID id: keyID, // 视频容器ID
accessToken: accessToken, accessToken: accessToken,
url: `ezopen://open.ys7.com/${VideoInfo.address}/${VideoInfo.channel || 1}.hd.rec`, url: url,
template: 'security', template: 'pcRec',
footer: ['talk', 'broadcast', 'hd', 'fullScreen'], footer: ['talk', 'broadcast', 'hd', 'fullScreen'],
width: VideoInfo.width || refs?.current?.offsetWidth || 952, width: VideoInfo.width || refs?.current?.offsetWidth || 952,
height: VideoInfo.height || refs?.current?.offsetHeight || 500, height: VideoInfo.height || refs?.current?.offsetHeight || 500,
}); });
PlayersA.pause = PlayersA.stop; PlayersA.pause = PlayersA.stop;
// VideoInfo.options && PlayersA.changePlayUrl(VideoInfo.options);
if (ref) ref.current = PlayersA; if (ref) ref.current = PlayersA;
}; };
...@@ -100,7 +106,7 @@ const Video = (props, ref) => { ...@@ -100,7 +106,7 @@ const Video = (props, ref) => {
} }
useEffect(() => { useEffect(() => {
if (VideoInfo.protocol === '萤石EZOPEN') { if (VideoInfo.protocol === '萤石EZOPEN' && VideoInfo.type === 'rec') {
VideoInfo.options && PlayersA && PlayersA.changePlayUrl(VideoInfo.options); VideoInfo.options && PlayersA && PlayersA.changePlayUrl(VideoInfo.options);
} }
}, [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