parent
7d72b50b1d
commit
c0bb31ac48
14 changed files with 153 additions and 97 deletions
@ -1,44 +1,52 @@ |
|||||||
import React from "react"; |
import React from "react"; |
||||||
import "./index.scss"; |
import "./index.scss"; |
||||||
import { connect } from "react-redux"; |
import { connect } from "react-redux"; |
||||||
import {book} from '../../../redux/actions'; |
import { book } from "../../../redux/actions"; |
||||||
|
|
||||||
function LessonPlayList({ lesson, selectedVideo,setVideoActive }: any) { |
function LessonPlayList({ video, selectedVideo, setVideoActive, num }: any) { |
||||||
return ( |
return ( |
||||||
<div className="lesson-playlist d-flex flex-column"> |
<> |
||||||
<header className="d-flex align-items-center"> |
{1 && ( |
||||||
<h3>{lesson.name}</h3> |
<div className="lesson-playlist d-flex flex-column"> |
||||||
<span></span> |
<header className="d-flex align-items-center"> |
||||||
</header> |
<h3>{'بخش 1'}</h3> |
||||||
{lesson.files.map((file: any, i: any) => ( |
<span></span> |
||||||
<div |
</header> |
||||||
className={ |
{/* {lesson.files.map((file: any, i: any) => ( */} |
||||||
"lesson-playlist__item d-flex align-items-center" + ' ' + |
<div |
||||||
(file.name === selectedVideo.name && |
className={ |
||||||
"lesson-playlist__item--active") |
"lesson-playlist__item d-flex align-items-center" + |
||||||
} |
" " + |
||||||
key={i} |
(video.id === selectedVideo.id && |
||||||
onClick={() => setVideoActive(file)} |
"lesson-playlist__item--active") |
||||||
> |
} |
||||||
<span className="lesson-playlist__item--count">{i + 1}</span> |
// key={i}
|
||||||
<div className="lesson-playlist__item--video"> |
onClick={() => setVideoActive(video)} |
||||||
<video> |
> |
||||||
<source src={file.src} /> |
<span className="lesson-playlist__item--count">{num}</span> |
||||||
</video> |
<div className="lesson-playlist__item--video"> |
||||||
<span>22:05</span> |
<video> |
||||||
</div> |
<source src={`https://dnvn.ir/api/v1/file/${video.fileIds}`} /> |
||||||
<div className="lesson-playlist__item--text d-flex flex-column"> |
</video> |
||||||
<h4>{file.name}</h4> |
<span>22:05</span> |
||||||
<p>{file.text}</p> |
</div> |
||||||
|
<div className="lesson-playlist__item--text d-flex flex-column"> |
||||||
|
<h4>{video.name}</h4> |
||||||
|
{/* <p>{file.text}</p> */} |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
|
{/* ))} */} |
||||||
</div> |
</div> |
||||||
))} |
)} |
||||||
</div> |
</> |
||||||
); |
); |
||||||
} |
} |
||||||
|
|
||||||
export default connect((state: any) => ({ |
export default connect( |
||||||
selectedVideo: state.book.selectedVideo, |
(state: any) => ({ |
||||||
}), { |
selectedVideo: state.book.selectedVideo, |
||||||
setVideoActive : book.setVideoActive, |
}), |
||||||
})(LessonPlayList); |
{ |
||||||
|
setVideoActive: book.setVideoActive, |
||||||
|
} |
||||||
|
)(LessonPlayList); |
||||||
|
Loading…
Reference in new issue