2019-06-25 15:47:43 +08:00
|
|
|
import React from 'react';
|
|
|
|
import VideoPlayer from '../video-player';
|
|
|
|
|
|
|
|
import '../../css/video-file-view.css';
|
|
|
|
|
|
|
|
const {
|
|
|
|
rawPath
|
|
|
|
} = window.app.pageOptions;
|
|
|
|
|
|
|
|
class FileContent extends React.Component {
|
|
|
|
render() {
|
2020-11-02 13:56:35 +08:00
|
|
|
const videoJsOptions = {
|
2019-06-25 15:47:43 +08:00
|
|
|
autoplay: false,
|
|
|
|
controls: true,
|
|
|
|
preload: 'auto',
|
|
|
|
sources: [{
|
|
|
|
src: rawPath
|
2020-11-02 13:56:35 +08:00
|
|
|
}]
|
|
|
|
};
|
2019-06-25 15:47:43 +08:00
|
|
|
return (
|
|
|
|
<div className="file-view-content flex-1 video-file-view">
|
|
|
|
<VideoPlayer { ...videoJsOptions } />
|
|
|
|
</div>
|
2020-11-02 13:56:35 +08:00
|
|
|
);
|
2019-06-25 15:47:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default FileContent;
|