Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-online-pc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-online-pc
Commits
e5dec625
提交
e5dec625
authored
8月 23, 2019
作者:
GOD_ZYX
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
705d0bed
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
2 行删除
+22
-2
videoH5.vue
client/components/player/chapterVideo/videoH5.vue
+20
-0
config.js
server/config.js
+2
-2
没有找到文件。
client/components/player/chapterVideo/videoH5.vue
浏览文件 @
e5dec625
...
...
@@ -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
)
...
...
server/config.js
浏览文件 @
e5dec625
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论