|
|
@@ -70,8 +70,8 @@ export default {
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
this.$notify.error({
|
|
|
- message: '视频 url 获取失败',
|
|
|
- type: 'warning',
|
|
|
+ message: error.message,
|
|
|
+ type: 'error',
|
|
|
duration: 3000
|
|
|
})
|
|
|
})
|
|
|
@@ -106,7 +106,7 @@ export default {
|
|
|
})
|
|
|
|
|
|
// 设置音量
|
|
|
- //player.volume(0.1, true, false)
|
|
|
+ // player.volume(0.1, true, false)
|
|
|
// 跳转到上次看到的位置
|
|
|
player.seek(pos)
|
|
|
|
|
|
@@ -123,14 +123,14 @@ export default {
|
|
|
jsonData.videoId = videoId
|
|
|
jsonData.currentTime = player.video.currentTime
|
|
|
SocketInstance.send(jsonData)
|
|
|
- const path = this.$route.path
|
|
|
- /*const nextPath = '/video/gz5RYkw1zn'
|
|
|
+
|
|
|
+ /* const path = this.$route.path
|
|
|
+ const nextPath = '/video/gz5RYkw1zn'
|
|
|
if (path !== nextPath) {
|
|
|
this.$router.push(nextPath)
|
|
|
} else {
|
|
|
console.log('视频播放完成')
|
|
|
}*/
|
|
|
- console.log('视频播放完成')
|
|
|
})
|
|
|
|
|
|
player.on('volumechange', () => {
|
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
initFlvPlayer(videoId, coverUrl, videoUrl) {
|
|
|
- const dp = new DPlayer({
|
|
|
+ new DPlayer({
|
|
|
container: document.getElementById('dplayer'),
|
|
|
video: {
|
|
|
url: videoUrl,
|