@smileeye.edu.vn/video
v0.1.5
Published
ReactJS/NextJS Library Component for upload/play Video. Easy to use. Upload to S3 server support.
Downloads
6
Readme
SmileEye.Edu.Vn React Video
ReactJS/NextJS Library Component for upload/play Video. Easy to use. Upload to S3 server support.
Live demo
https://link-to-demo
Setup
Install SmileEye.Edu.Vn React Video with npm
npm install @smileeye.edu.vn/video
Get API key at https://link-to-project
Add API key at .env
file.
// ReactJS .env
REACT_APP_CODEBY_STORAGE_URL=https://package-storage.codeby.com
REACT_APP_CODEBY_STORAGE_TOKEN=xxx
REACT_APP_CODEBY_STORAGE_API=xxx
// NextJS .env
NEXT_PUBLIC_CODEBY_STORAGE_URL=https://package-storage.codeby.com
NEXT_PUBLIC_CODEBY_STORAGE_TOKEN=xxx
NEXT_PUBLIC_CODEBY_STORAGE_API=xxx
Usage/Examples
import {VideoSingleUpload, VideoPlay} from "@smileeye.edu.vn/video";
import {useEffect, useState} from "react";
import "@smileeye.edu.vn/video/src/smileeye.edu.vn-video.min.css";
const App = () => {
const [value, setValue] = useState()
useEffect(() => {
console.log("useEffect value", value)
}, [value])
return (
<>
<VideoSingleUpload
value={value}
onChange={setValue}
/>
<hr/>
<VideoPlay video={value}/>
</>
)
}
export default App
Support
For support, email [email protected]
or join our Slack channel.
R&D by https://smileeye.edu.vn