mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
18 lines
490 B
TypeScript
18 lines
490 B
TypeScript
import { FunctionComponent } from 'react'
|
|
import ReactPlayer from 'react-player'
|
|
|
|
export const AudioPreview: FunctionComponent<{ file: any }> = ({ file }) => {
|
|
return (
|
|
<div className="bg-white rounded shadow p-3 w-full">
|
|
<div className="text-center mb-6">{file.name}</div>
|
|
<ReactPlayer
|
|
url={file['@microsoft.graph.downloadUrl']}
|
|
controls
|
|
width="100%"
|
|
height="48px"
|
|
config={{ file: { forceAudio: true } }}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|