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

fix: 修改视频vms

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