mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-22 11:57:34 +00:00
[view history/snapshot/trash file] rewrote them with react
This commit is contained in:
26
frontend/src/components/file-content-view/audio.js
Normal file
26
frontend/src/components/file-content-view/audio.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import AudioPlayer from '../audio-player';
|
||||
|
||||
import '../../css/audio-file-view.css';
|
||||
|
||||
const { rawPath } = window.app.pageOptions;
|
||||
|
||||
class FileContent extends React.Component {
|
||||
render() {
|
||||
const videoJsOptions = {
|
||||
autoplay: false,
|
||||
controls: true,
|
||||
preload: 'auto',
|
||||
sources: [{
|
||||
src: rawPath
|
||||
}]
|
||||
};
|
||||
return (
|
||||
<div className="file-view-content flex-1 audio-file-view">
|
||||
<AudioPlayer { ...videoJsOptions } />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default FileContent;
|
Reference in New Issue
Block a user