|
|
|
@ -14,6 +14,7 @@ import './video.css';
|
|
|
|
|
import '../../user/usersInfo/video/InfosVideo.css'
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import { logWatchHistory } from "../../../services/video-service";
|
|
|
|
|
import { Base64 } from 'js-base64';
|
|
|
|
|
|
|
|
|
|
const DEFAULT_VIDEO_WIDTH_IN_MD = "90%" // 400
|
|
|
|
|
const DEFAULT_VIDEO_HEIGHT_IN_MD = "55%" // 400
|
|
|
|
@ -33,7 +34,8 @@ class Video extends Component {
|
|
|
|
|
visible: false,
|
|
|
|
|
|
|
|
|
|
moveVisible: false,
|
|
|
|
|
moveVideoId: undefined
|
|
|
|
|
moveVideoId: undefined,
|
|
|
|
|
videourl:null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -64,6 +66,7 @@ class Video extends Component {
|
|
|
|
|
if (!_clipboard) {
|
|
|
|
|
_clipboard = new ClipboardJS('.copybtn');
|
|
|
|
|
_clipboard.on('success', (e) => {
|
|
|
|
|
|
|
|
|
|
this.props.showNotification('复制成功');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -110,6 +113,7 @@ class Video extends Component {
|
|
|
|
|
videoVisible: flag
|
|
|
|
|
})
|
|
|
|
|
if (flag === false) {
|
|
|
|
|
|
|
|
|
|
if (_clipboard) {
|
|
|
|
|
this.setState({
|
|
|
|
|
videoId: undefined
|
|
|
|
@ -119,8 +123,12 @@ class Video extends Component {
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.setState({
|
|
|
|
|
videourl:'12321'
|
|
|
|
|
})
|
|
|
|
|
if (!_clipboard) {
|
|
|
|
|
_clipboard = new ClipboardJS('.copybtn');
|
|
|
|
|
|
|
|
|
|
_clipboard.on('success', (e) => {
|
|
|
|
|
this.props.showNotification('复制成功');
|
|
|
|
|
});
|
|
|
|
@ -131,7 +139,7 @@ class Video extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getCopyText = (file_url, cover_url) => {
|
|
|
|
|
return `<video src="${file_url}" controls="true" controlslist="nodownload" width="${DEFAULT_VIDEO_WIDTH_IN_MD}" height="${DEFAULT_VIDEO_HEIGHT_IN_MD}" poster="${cover_url}">您的浏览器不支持 video 标签。</video>`
|
|
|
|
|
return `<video src="${Base64.decode(file_url)}" controls="true" controlslist="nodownload" width="${DEFAULT_VIDEO_WIDTH_IN_MD}" height="${DEFAULT_VIDEO_HEIGHT_IN_MD}" poster="${cover_url}">您的浏览器不支持 video 标签。</video>`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除事件
|
|
|
|
@ -228,9 +236,9 @@ class Video extends Component {
|
|
|
|
|
className="showVideoModal"
|
|
|
|
|
width={800 - 1}
|
|
|
|
|
>
|
|
|
|
|
{videoId && <VideoPanel src={videoId.file_url} videoId={videoId.videoId} courseId={CourseId} logWatchHistory={logWatchHistory} />}
|
|
|
|
|
{videoId && <VideoPanel src={this.state.videourl===null?videoId.file_url:Base64.decode(videoId.file_url)} videoId={videoId.videoId} courseId={CourseId} logWatchHistory={logWatchHistory} />}
|
|
|
|
|
|
|
|
|
|
<div className="df copyLine">
|
|
|
|
|
<div className="df copyLine" style={{}}>
|
|
|
|
|
<Input value={_inputValue}
|
|
|
|
|
className="dark"
|
|
|
|
|
></Input>
|
|
|
|
|