mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 04:58:55 +08:00
20 lines
580 B
JavaScript
20 lines
580 B
JavaScript
import React from 'react';
|
|
import SublimeVideo from 'react-sublime-video';
|
|
|
|
export default function VideoPlayer({ video }) {
|
|
const { alt, description, src } = video;
|
|
const videoClassName = video.class;
|
|
|
|
return (
|
|
<div className={`preview-image-box ${videoClassName}`}>
|
|
<div className={'preview-image-wrapper'}>
|
|
<SublimeVideo src={src} type="video/mp4" />
|
|
</div>
|
|
<div className="preview-image-title">{alt}</div>
|
|
<div className="preview-image-description"
|
|
dangerouslySetInnerHTML={{ __html: description }}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|