develop^2
daiao 5 years ago
commit bce7f454c8

@ -11,6 +11,7 @@ import HeadlessModal from '../common/HeadlessModal'
import ClipboardJS from 'clipboard'
import VideoPlay from '../../../courses/Video/video-play';
import { logWatchHistory } from '../../../../services/video-service';
import { Base64 } from 'js-base64';
function useModal(initValue) {
const [visible, setVisible] = useState(initValue)
@ -250,8 +251,10 @@ function InfoVideo(props) {
});
}
function 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>`
}
if(file_url){
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>`
}
}
const _inputValue = getCopyText(videoId.file_url, videoId.cover_url);
const sorts = sortKey.split('-')
@ -268,7 +271,7 @@ function InfoVideo(props) {
className="showVideoModal"
width={800 - 1}
>
{videoModalObj.visible && <VideoPlay src={videoId.file_url} videoId={videoId.videoId} logWatchHistory={logWatchHistory} />}
{videoModalObj.visible && <VideoPlay src={Base64.decode(videoId.file_url)} videoId={videoId.videoId} logWatchHistory={logWatchHistory} />}
<div className="df copyLine">
<Input value={_inputValue}
className="dark"

Loading…
Cancel
Save