Commit e9f21862 authored by 以墨为白's avatar 以墨为白 🎧

bofang

parent 088256df
......@@ -517,9 +517,11 @@ export default {
_this.title = "正在播放视频---" + row.name;
_this.centerDialogVisible_video = true;
setTimeout(function () {
let path_srt = "api/rest/file/download/Document/";
path_srt = path_srt + row.file.uuid;
_this.video_src = path_srt;
// let path_srt = "api/rest/file/download/Document/";
// path_srt = path_srt + row.file.uuid;
// _this.video_src = path_srt;
_this.video_src = `api/rest/file/playVideo/Document?objectName=${row.file.uuid}`
if (document.getElementById("video").currentTime != 0)
document.getElementById("video").currentTime = 0;
}, 500);
......
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Video.js 6.2.8</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.3.0/video-js.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.3.0/video.min.js"></script>
<style>
</style>
</head>
<body>
<div class="m">
<video id="my-video" class="video-js" controls preload="auto" width="740" height="400" data-setup="{}">
</video>
</div>
</body>
<script type="text/javascript">
var myPlayer = videojs('my-video', {
sources: [{
src: "http://localhost:8080/req.mp4",
autoplay: true,
playbackRates: [0.5, 1, 1.5, 2] //倍速播放
}]
}, function () {
console.log("videojs播放器初始化成功");
});
myPlayer.play();
</script>
</html>
\ No newline at end of file
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