视频停止

courseware
caicai8 5 years ago
parent 8311fc8ed0
commit bf3924f389

@ -67,7 +67,7 @@ function InfoVideo(props) {
const { showNotification, history } = props; const { showNotification, history } = props;
const username = props.match.params.username; const username = props.match.params.username;
const { user } = props; const { user } = props;
console.log(user);
function toUpload() { function toUpload() {
if (props.current_user.admin || (props.current_user.is_teacher && props.checkIfProfessionalCertification())) { if (props.current_user.admin || (props.current_user.is_teacher && props.checkIfProfessionalCertification())) {
history.push(`/users/${username}/videos/upload`) history.push(`/users/${username}/videos/upload`)
@ -144,7 +144,8 @@ function InfoVideo(props) {
useEffect(() => { useEffect(() => {
if (videoModalObj.visible == false) { if (videoModalObj.visible == false) {
// 关闭视频 // 关闭视频
videoEl.current && videoEl.current.pause() videoEl.current && videoEl.current.pause();
videoId = {};
if (_clipboard) { if (_clipboard) {
_clipboard.destroy(); _clipboard.destroy();
_clipboard = null; _clipboard = null;
@ -266,7 +267,7 @@ function InfoVideo(props) {
className="showVideoModal" className="showVideoModal"
width={800 - 1} width={800 - 1}
> >
<VideoPlay src={videoId.file_url} /> {videoModalObj.visible && <VideoPlay src={videoId.file_url} />}
<div className="df copyLine"> <div className="df copyLine">
<Input value={_inputValue} <Input value={_inputValue}
className="dark" className="dark"

Loading…
Cancel
Save