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

bug fixes

上级 6301dabd
......@@ -124,8 +124,15 @@ const getCurrentChapterDetail = (sid, vid, videoType,callback) => {
}
/* 结束时,调用接口 */
const endVideo = (sid) => {
let json = wx.getStorageSync('video_001') || { semester_id: '' ,vid: '', log_key: '' }
const endVideo = (obj) => {
let json = wx.getStorageSync('video_001') || { semester_id: '', vid: '', log_key: '' }
json.uid = wx.getStorageSync('uid')
json.sid = wx.getStorageSync('sid')
json.d = obj.did
json.i = obj.did
json.c = obj.cid
json.s = json.semester_id
json.v = json.vid
if (json.vid !== '') {
util.requestApi({
url: util.config.URL_PATH1 + '/v2/education/end-aliyun-video-streaming',
......
......@@ -174,7 +174,6 @@ Page({
})
// CC视频走这个接口
ChapterApi.getCurrentChapterDetail(sid, vid, videoType, (json) => {
ChapterApi.endVideo()
// 播放的视频数据
this.setData({ video: json.video })
this.setData({ audio: json.audio })
......@@ -185,6 +184,7 @@ Page({
res.cid = cid
res.sid = sid
this.initPage(res, vid)
ChapterApi.endVideo(res)
})
})
},
......@@ -209,11 +209,11 @@ Page({
this.isBackend = true
this.pauseVA()
clearInterval(this.heartbeat)
ChapterApi.endVideo()
ChapterApi.endVideo(this.realTimeProgress)
},
onUnload: function () {
this.pauseVA()
ChapterApi.endVideo()
ChapterApi.endVideo(this.realTimeProgress)
},
onShow: function () {
/* 兼容 android 这里发现 android 打开预览大图,然后关闭 自动播放视频,而且关不掉, 兼容android强制关闭视频 */
......
......@@ -18,16 +18,19 @@
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论