提交 e5dec625 authored 作者: GOD_ZYX's avatar GOD_ZYX

update

上级 705d0bed
......@@ -107,6 +107,25 @@ export default {
window._playerFinish = function () {
that.$emit('handlePlayfinish', { time: videoPlayer.getDuration() })
}
// 视频播放 - error
window._player403Stop = function (e) {
/* 过期 重新刷新 */
if (e.paramData.error_code === 4006) {
that.$message.error('视频播放错误,请刷新重试!')
} else if (e.paramData.error_code === 4016) {
/* 当视频过期时,重新 获取接口 更改播放地址 重新播放 */
const loading = that.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.chapterAction.getCurrentChapterDetailAliyun(that.videoId).then(json => {
that.videoArr = json.video
let player = that.getPlayer()
if (!objPlayer || !player.innerHTML) {
that.renderPlayer(PLAYER_ID, that.videoId, that.autoPlay, that.videoSrt, that.username, that.width, that.height)
} else {
that.playNextVideo(PLAYER_ID, that.videoId, that.autoPlay, that.videoSrt, that.username, that.width, that.height)
}
}).catch(e => { that.$message.error(e.message) }).finally(() => { loading.close() })
}
}
// 播放控件 - 初始化完成时,注册播放事件
// window._playerCallback =
},
......@@ -152,6 +171,7 @@ export default {
videoPlayer.on('startSeek', window._playerSeekStart) // 开始拖拽
videoPlayer.on('completeSeek', window._playerSeek) // 拖动进度条
videoPlayer.on('ended', window._playerFinish) // 结束
videoPlayer.on('error', window._player403Stop) // 播放出现未授权情况
}
})
this.setSize(width, height)
......
......@@ -6,8 +6,8 @@ if (state === 'test') {
// conf.agentApiUrl = 'http://10.1.1.5:8024/'
// conf.agentApiUrl = 'http://192.168.3.254:8081'
} else if (state === 'production') {
conf.agentApiUrl = 'https://zapi.ezijing.com/'
// conf.agentApiUrl = 'https://api2.ezijing.com/'
// conf.agentApiUrl = 'https://zapi.ezijing.com/'
conf.agentApiUrl = 'https://api2.ezijing.com/'
}
global.app = null
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论