da102b08 by zhen

feat:视频支持HLS协议

1 parent 6f7236d3
......@@ -14,6 +14,7 @@
<script>
import videojs from 'video.js'
import video_zhCN from 'video.js/dist/lang/zh-CN.json'
import { throttle } from '@/utils/util'
const mirrerIcon =
'<svg t="1594374364946" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2814" width="16" height="16"><path d="M424.2 230.4c0.6 0.2 1.2 0.4 1.6 0.5L160.6 148c-2.9-0.6-6-0.9-9.2-0.9-24.5 0-44.4 19.9-44.4 44.4v634.8c0 24.6 19.9 44.5 44.4 44.5 3.2 0 6.2-0.4 9.2-0.9L432.4 785c17.9-9.2 30.1-27.9 30.1-49.3V283.2c-0.1-24.6-16.1-45.6-38.3-52.8z m-28.4 485.9l-222.1 59.2V242.3l222.1 59.2v414.8z m466.4-569.2c-3.2 0-6.2 0.4-9.2 0.9l-262 82c0.4-0.1 0.7-0.1 0.9-0.2-23.5 6.5-40.8 28-40.8 53.5v452.3c0 21.5 12.2 40.1 30.1 49.4l271.6 84.9c2.9 0.6 6.1 0.9 9.3 0.9 24.5 0 44.4-19.9 44.4-44.5V191.5c0.2-24.5-19.7-44.4-44.3-44.4z" p-id="2815" fill="#ffffff"></path></svg>'
......@@ -101,7 +102,10 @@ export default {
// 重新设置video的视频来源
if (this.player) {
this.player.pause()
this.player.src(val)
this.player.src({
src: val,
type: 'application/x-mpegURL'
})
this.player.load()
}
}
......@@ -115,11 +119,6 @@ export default {
this.player.dispose()
}
},
// TODO 确认是否删除
// beforeRouteLeave(to, from, next) {
// this.stopVideo()
// next()
// },
methods: {
init() {
this.player = videojs(
......@@ -158,7 +157,6 @@ export default {
// this.player.play()
// })
// })
this.player.src(this.url)
},
timeupdate() {
// 获取视频当前播放时间
......
......@@ -124,7 +124,7 @@ export default {
recordId: this.custInfoCopy.recordId
})
this.form.remarks = monitorRemarks
this.videoUrl = url
this.videoUrl = url.replace('http', 'https')
} catch (error) {
console.log(error)
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!