Commit 27ff23d1 authored by 李纪文's avatar 李纪文

feat: 修改isc视频回放

parent 8eaeb2c8
......@@ -48,13 +48,16 @@ const HKh5player = (props, ref) => {
useEffect(() => {
setShowId(props?.VideoInfo?.id || '');
setHoursRuler(props?.VideoInfo.hoursRuler || 24);
const playTimes = props?.VideoInfo?.playTime ? moment(props?.VideoInfo?.playTime).valueOf() : null;
const playTimes = props?.VideoInfo?.playTime
? moment(props?.VideoInfo?.playTime).valueOf()
: null;
setPlayTimestamp(playTimes);
changeReplayCfg?.(playTimes);
// 设置播放容器的宽高并监听窗口大小变化
window.addEventListener('resize', resizeVideo);
return () => {
window.removeEventListener('resize', resizeVideo);
player.current?.removeAllListeners?.();
player.current?.JS_Destroy?.();
player.current = null;
};
......
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