mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 23:34:45 +00:00
add-download-url (#6771)
* add-download-url * update unitest * update * update * update * update * Update test_view_lib_file.py * code-optimize * Update shared-dir-view.js * code-optimize
This commit is contained in:
@@ -3,10 +3,11 @@ import ReactDom from 'react-dom';
|
||||
import SharedFileView from './components/shared-file-view/shared-file-view';
|
||||
import SharedFileViewTip from './components/shared-file-view/shared-file-view-tip';
|
||||
import VideoPlayer from './components/video-player';
|
||||
import { MimetypesKind } from './utils/constants';
|
||||
|
||||
import './css/video-file-view.css';
|
||||
|
||||
const { rawPath, err } = window.shared.pageOptions;
|
||||
const { rawPath, err, fileExt } = window.shared.pageOptions;
|
||||
|
||||
class SharedFileViewImage extends React.Component {
|
||||
render() {
|
||||
@@ -19,14 +20,14 @@ class FileContent extends React.Component {
|
||||
if (err) {
|
||||
return <SharedFileViewTip />;
|
||||
}
|
||||
|
||||
const videoJsOptions = {
|
||||
autoplay: false,
|
||||
controls: true,
|
||||
preload: 'auto',
|
||||
playbackRates: [0.5, 1, 1.5, 2],
|
||||
sources: [{
|
||||
src: rawPath
|
||||
src: rawPath,
|
||||
type: MimetypesKind[fileExt] || 'video/mp4'
|
||||
}]
|
||||
};
|
||||
return (
|
||||
|
Reference in New Issue
Block a user