Commit 9b390602 authored by tandin2000's avatar tandin2000

changes for chaveena

parent de55cb57
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -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,65 +67,38 @@ function Upload() { ...@@ -67,65 +67,38 @@ 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>
<ReactPlayer {buttonStatus === true ? (
ref= {playerRef} <div>
<ReactPlayer
url={videoFilePath} ref= {playerRef}
playing={isPlaying}
width="50%" url={videoFilePath}
height="50%" playing={isPlaying}
controls={true} width="50%"
onReady={onReady} height="50%"
/> controls={true}
<br /> onReady={onReady}
{/* <video controls> />
<source src="C:\Users\User\Desktop\Backup\MyDATA\SLIIT\Video Indexing\Indexing\upload\IAS_Lec1_10min.mp4" /> <br />
</video> */} <p>
<p> {selectOptions}
{selectOptions} </p>
</p>
</div>
): ""}
</center>
</div> </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