提交 1ed818eb authored 作者: 王鹏飞's avatar 王鹏飞

修复线上代码错误导致的系统报警

上级 fb000368
......@@ -126,7 +126,7 @@ module.exports = Behavior({
},
// 跳转到指定位置,单位s
seek(position) {
this.player.seek(position)
this.player && this.player.seek(position)
console.log('video', 'seek')
},
// 设置倍速播放
......@@ -188,10 +188,11 @@ module.exports = Behavior({
const { duration } = e.detail
this.setData({ duration })
console.log('video', 'onloadedmetadata')
this.data.startTime && this.seek(this.data.startTime)
},
onFullScreenChange() {
this.triggerEvent('fullscreenchange')
console.log('video', 'onloadedmetadata')
console.log('video', 'onfullscreenchange')
},
onError(e) {
this.updateStatus('ended')
......
......@@ -7,7 +7,7 @@
autoplay="{{ autoplay }}"
loop="{{ loop }}"
muted="{{ muted }}"
initial-time="{{ time }}"
initial-time="{{ startTime }}"
show-center-play-btn="{{ false }}"
auto-pause-if-open-native="{{ false }}"
bindplay="onPlay"
......
......@@ -3,13 +3,13 @@ const env = 'production'
if (env === 'production') {
module.exports = {
appVersion: 'sofia_v3.2.7',
appVersion: 'sofia_v3.2.8',
apiBaseURL: 'https://wechat-api.ezijing.com', // 接口请求地址
tenant: 'sofia'
}
} else {
module.exports = {
appVersion: 'sofia_v3.2.7',
appVersion: 'sofia_v3.2.8',
apiBaseURL: 'https://wechat-api2.ezijing.com', // 接口请求地址
tenant: 'sofia'
}
......
......@@ -96,8 +96,11 @@ Page({
}
// 跳转播放进度
const player = this.selectComponent('#player')
if (player && this.data.progress.cpt) {
player.seek(this.data.progress.cpt)
if (player) {
const startTime = this.data.progress.cpt
this.setData({ 'progress.cpt': startTime })
player.seek(startTime)
console.log(startTime)
}
this.setData({ 'progress.loaded': true })
})
......
......@@ -4,6 +4,7 @@
id="player"
src="{{ videoPlayUrl }}"
autoplay="{{ autoplay }}"
startTime="{{ progress.cpt }}"
bindtimeupdate="onTimeupdate"
bindswitchAudio="onSwitchVideo"
wx:if="{{ hasVideo }}"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论