Commit b850c46b authored by 李纪文's avatar 李纪文

feat: 视频回放增加加载配置

parent ad67dcfe
...@@ -126,7 +126,14 @@ const Demo2 = (props) => { ...@@ -126,7 +126,14 @@ const Demo2 = (props) => {
<button onClick={testVideo}>测试</button> <button onClick={testVideo}>测试</button>
<button onClick={destroyVideo}>销毁</button> <button onClick={destroyVideo}>销毁</button>
<div style={{ height: '700px' }}> <div style={{ height: '700px' }}>
<Video {...{ JessibucaObj: JessibucaObj, VideoInfo: VideoInfo }} ref={jessibuca} /> <Video
{...{
JessibucaObj: JessibucaObj,
VideoInfo: VideoInfo,
ProgressBar: { strokeColor: 'red', textColor: 'red' },
}}
ref={jessibuca}
/>
</div> </div>
</div> </div>
); );
......
...@@ -13,7 +13,7 @@ const RecVideo = (props, ref) => { ...@@ -13,7 +13,7 @@ const RecVideo = (props, ref) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('rec-video-view'); const prefixCls = getPrefixCls('rec-video-view');
const { VideoInfo, JessibucaObj } = props; const { VideoInfo, JessibucaObj, ProgressBar } = props;
const jessibuca = useRef(null); const jessibuca = useRef(null);
const [hoursRuler, setHoursRuler] = useState(VideoInfo.hoursRuler || 24); const [hoursRuler, setHoursRuler] = useState(VideoInfo.hoursRuler || 24);
const [showId, setShowId] = useState(null); //视频ID const [showId, setShowId] = useState(null); //视频ID
...@@ -146,10 +146,18 @@ const RecVideo = (props, ref) => { ...@@ -146,10 +146,18 @@ const RecVideo = (props, ref) => {
<div className={classNames(`${prefixCls}-load`)}> <div className={classNames(`${prefixCls}-load`)}>
<Progress <Progress
className={classNames(`${prefixCls}-progress`)} className={classNames(`${prefixCls}-progress`)}
strokeColor={ProgressBar?.strokeColor || ''}
format={(percent) => {
return (
<span style={{ color: ProgressBar?.textColor || 'unset' }}>{percent + '%'}</span>
);
}}
strokeWidth={14} strokeWidth={14}
percent={percent} percent={percent}
/> />
<span>视频回放信息获取中,请稍后...</span> <span style={{ color: ProgressBar?.textColor || 'unset' }}>
视频回放信息获取中,请稍后...
</span>
</div> </div>
</> </>
) : showId ? ( ) : showId ? (
......
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