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

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

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