Commit 03f7f066 authored by De Silva K.C.C.C's avatar De Silva K.C.C.C

Merge branch 'IT19408316' of http://gitlab.sliit.lk/2022-066/evsdh into IT19408316

parents ba951037 9b390602
...@@ -13,6 +13,7 @@ function Upload() { ...@@ -13,6 +13,7 @@ function Upload() {
const [video, setVideo] = useState(""); const [video, setVideo] = useState("");
const [indexingData, setIndexingData] = useState([]) const [indexingData, setIndexingData] = useState([])
// const [post, setPost] = React.useState(null); // const [post, setPost] = React.useState(null);
const [buttonStatus, setButtonStatus] = useState(false);
const [videoFilePath, setVideoFilePath] = useState([]); const [videoFilePath, setVideoFilePath] = useState([]);
const [initialValue, setInitalValue] = useState(0); const [initialValue, setInitalValue] = useState(0);
const handleVideoUpload = (event) => { const handleVideoUpload = (event) => {
...@@ -21,7 +22,7 @@ function Upload() { ...@@ -21,7 +22,7 @@ function Upload() {
}; };
const onReady = React.useCallback(() => { const onReady = React.useCallback(() => {
console.log("here") // console.log("here")
if (!isReady) { if (!isReady) {
playerRef.current.seekTo(initialValue, "seconds"); playerRef.current.seekTo(initialValue, "seconds");
setIsReady(true); setIsReady(true);
...@@ -38,8 +39,7 @@ function Upload() { ...@@ -38,8 +39,7 @@ function Upload() {
.then(response => response.json()) .then(response => response.json())
.then(response => { .then(response => {
setIndexingData(response); setIndexingData(response);
setButtonStatus(true);
// setVideoFilePath('C:\Users\User\Desktop\Backup\MyDATA\SLIIT\Video Indexing\Indexing\upload
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);
...@@ -67,11 +67,15 @@ function Upload() { ...@@ -67,11 +67,15 @@ function Upload() {
return ( return (
<div> <>
<center>
<input type="file" className='forrm-control' onChange={handleVideoUpload}></input> <div style={{"background-color":"White", width:"60%", "border-radius": "15px", "margin-top":"50px"}}>
<center>
<input type="file" className='forrm-control' style={{"margin-top": "100px","margin-bottom": "50px" }} onChange={handleVideoUpload}></input>
<button onClick={sendVideo} className="btn btn-primary">Upload</button> <button onClick={sendVideo} className="btn btn-primary">Upload</button>
{buttonStatus === true ? (
<div>
<ReactPlayer <ReactPlayer
ref= {playerRef} ref= {playerRef}
...@@ -83,49 +87,18 @@ function Upload() { ...@@ -83,49 +87,18 @@ function Upload() {
onReady={onReady} onReady={onReady}
/> />
<br /> <br />
{/* <video controls>
<source src="C:\Users\User\Desktop\Backup\MyDATA\SLIIT\Video Indexing\Indexing\upload\IAS_Lec1_10min.mp4" />
</video> */}
<p> <p>
{selectOptions} {selectOptions}
</p> </p>
</div>
</div>
): ""}
</center>
</div>
</center>
</>
// <div className="background-material">
// <div className="container mt-4 shadow p-3 mb-5 bg-body rounded">
// <div>
// <h3>UPLOAD THE VIDEO</h3>
// <div className="container mt-4 p-3 mb-5 bg-body rounded">
// <form
// className="row g-3">
// <div className="form-group files">
// <input
// type="file"
// className="form-control"
// onChange={(e)=>setVideo(e.target.files[0])}
// multiple=""
// required=""
// />
// <button onClick={sendVideo}>UPLOAD</button>
// </div>
// {/* <div className="row g-3">
// <button onClick={sendVideo} className="button2-submit button-submit">UPLOAD</button>
// </div> */}
// </form>
// </div>
// </div>
// </div>
// </div>
); );
} }
......
...@@ -28,21 +28,21 @@ class AboutUs extends Component { ...@@ -28,21 +28,21 @@ class AboutUs extends Component {
<span className='aim_icon'> <span className='aim_icon'>
<ImUsers/> <ImUsers/>
</span> </span>
<h3>450 +</h3> <h3>6 +</h3>
<p>Subscribers</p> <p>Subscribers</p>
</article> </article>
<article className='aim_card'> <article className='aim_card'>
<span className='aim_icon'> <span className='aim_icon'>
<MdSubscriptions/> <MdSubscriptions/>
</span> </span>
<h3>500 +</h3> <h3>25 +</h3>
<p>Videos</p> <p>Videos</p>
</article> </article>
<article className='aim_card'> <article className='aim_card'>
<span className='aim_icon'> <span className='aim_icon'>
<MdSubscriptions/> <MdSubscriptions/>
</span> </span>
<h3>500 +</h3> <h3>25 +</h3>
<p>Videos</p> <p>Videos</p>
</article> </article>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment