提交 3dd2d663 authored 作者: hexi's avatar hexi

Merge branch 'master' into bluestar

...@@ -24,11 +24,11 @@ const getChapterList = (cur_course_id, cur_semester_id, cur_video_id, callback) ...@@ -24,11 +24,11 @@ const getChapterList = (cur_course_id, cur_semester_id, cur_video_id, callback)
name: _.children[j-1].name name: _.children[j-1].name
} }
} else if (i-1>=0) { } else if (i-1>=0) {
let _temp = res.data.chapters[i - 1] let _temp = res.data.chapters[i - 1];
prevVideo = { prevVideo = {
id: _temp.children[_temp.children.length-1].resource_id, id: _temp.children[_temp.children.length-1].resource_id,
time: _temp.children[_temp.children.length-1].video && util.durationToTimeString(_temp.children[_temp.children.length-1].video.video_length) || '', time: _temp.children[_temp.children.length-1].video && util.durationToTimeString(_temp.children[_temp.children.length-1].video.video_length) || '',
videoType: _.children[_temp.children.length-1].video && _.children[_temp.children.length-1].video.video_provider || '', videoType: _temp.children[_temp.children.length-1].video && _temp.children[_temp.children.length-1].video.video_provider || '',
name: _temp.children[_temp.children.length-1].name name: _temp.children[_temp.children.length-1].name
} }
} }
...@@ -44,7 +44,7 @@ const getChapterList = (cur_course_id, cur_semester_id, cur_video_id, callback) ...@@ -44,7 +44,7 @@ const getChapterList = (cur_course_id, cur_semester_id, cur_video_id, callback)
nextVideo = { nextVideo = {
id: _temp.children[0].resource_id, id: _temp.children[0].resource_id,
time: _temp.children[0].video && util.durationToTimeString(_temp.children[0].video.video_length) || '', time: _temp.children[0].video && util.durationToTimeString(_temp.children[0].video.video_length) || '',
videoType: _.children[0].video && _.children[0].video.video_provider || '', videoType: _temp.children[0].video && _temp.children[0].video.video_provider || '',
name: _temp.children[0].name name: _temp.children[0].name
} }
} }
...@@ -77,7 +77,7 @@ const getChapterList = (cur_course_id, cur_semester_id, cur_video_id, callback) ...@@ -77,7 +77,7 @@ const getChapterList = (cur_course_id, cur_semester_id, cur_video_id, callback)
}), }),
nextVideo: nextVideo, nextVideo: nextVideo,
prevVideo: prevVideo prevVideo: prevVideo
} };
callback(json) callback(json)
} }
}) })
...@@ -102,7 +102,7 @@ const getCurrentChapterDetail = (vid, videoType,callback) => { ...@@ -102,7 +102,7 @@ const getCurrentChapterDetail = (vid, videoType,callback) => {
let json = { let json = {
video: { video: {
src: videoType == 3 ? res.data.video &&res.data.video.LD : res.data.video[0] && res.data.video[0].playurl, src: videoType == 3 ? res.data.video &&res.data.video.LD : res.data.video[0] && res.data.video[0].playurl,
spareSrc: 'http://pd4t7ae3m.bkt.clouddn.com/test.mp4' // 正式环境时,需要将 contentVideo 中 spareSrc 改成 src spareSrc: 'https://pd4t7ae3m.bkt.clouddn.com/test.mp4' // 正式环境时,需要将 contentVideo 中 spareSrc 改成 src
}, },
audio: { audio: {
src: videoType == 3 ? res.data.video &&res.data.video.SQ : res.data.audio[0].url, src: videoType == 3 ? res.data.video &&res.data.video.SQ : res.data.audio[0].url,
......
...@@ -28,7 +28,7 @@ Page({ ...@@ -28,7 +28,7 @@ Page({
audioPause: function () { this._audio.pause(); this.playAudio = false; }, audioPause: function () { this._audio.pause(); this.playAudio = false; },
videoPause: function () { this._video.pause(); this.playVideo = false; }, videoPause: function () { this._video.pause(); this.playVideo = false; },
videoShowOrHide: function () { this.setData({ 'isVideoShow': !this.data.isVideoShow }) }, videoShowOrHide: function () { this.setData({ 'isVideoShow': !this.data.isVideoShow }) },
changeVideo: function () { this.setData({ 'video.src': 'http://pd4t7ae3m.bkt.clouddn.com/test.mp4' }); }, changeVideo: function () { this.setData({ 'video.src': 'https://pd4t7ae3m.bkt.clouddn.com/test.mp4' }); },
timeUpdate: function (e) { timeUpdate: function (e) {
let _data = this.data, _status = _data.status, _detail = e.detail, _obj = {} let _data = this.data, _status = _data.status, _detail = e.detail, _obj = {}
console.log('视频时间变化', parseInt(_detail.currentTime)) console.log('视频时间变化', parseInt(_detail.currentTime))
...@@ -46,9 +46,9 @@ Page({ ...@@ -46,9 +46,9 @@ Page({
let _ = this let _ = this
wx.previewImage({ wx.previewImage({
urls: [ urls: [
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test1.jpg', 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test1.jpg',
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test2.jpg', 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test2.jpg',
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test3.jpg' 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test3.jpg'
], ],
current: 0, current: 0,
success: () => { success: () => {
...@@ -71,9 +71,9 @@ Page({ ...@@ -71,9 +71,9 @@ Page({
wx.previewImage({ wx.previewImage({
urls: [ urls: [
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test1.jpg', 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test1.jpg',
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test2.jpg', 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test2.jpg',
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test3.jpg' 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test3.jpg'
], ],
current: 0, current: 0,
success: () => {} success: () => {}
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<button bindtap='videoShowOrHide'>视频显示/隐藏</button> <button bindtap='videoShowOrHide'>视频显示/隐藏</button>
<view class='start-time'>播放时间:{{currentTime}}</view> <view class='start-time'>播放时间:{{currentTime}}</view>
<view class='end-time'>总时间:{{totalTime}}</view> <view class='end-time'>总时间:{{totalTime}}</view>
<audio id='audio-play' src='http://pd4t7ae3m.bkt.clouddn.com/audio-test.mp3'></audio> <audio id='audio-play' src='https://pd4t7ae3m.bkt.clouddn.com/audio-test.mp3'></audio>
<view style='{{isVideoShow ? "": "display:none"}}'> <view style='{{isVideoShow ? "": "display:none"}}'>
<video id='video-play' style="width: 750rpx;" src='{{video.src}}' bindtimeupdate='timeUpdate' show-center-play-btn='{{false}}' controls='{{false}}'></video> <video id='video-play' style="width: 750rpx;" src='{{video.src}}' bindtimeupdate='timeUpdate' show-center-play-btn='{{false}}' controls='{{false}}'></video>
</view> </view>
\ No newline at end of file
...@@ -31,20 +31,20 @@ Page({ ...@@ -31,20 +31,20 @@ Page({
/* 视频地址 */ /* 视频地址 */
video: { video: {
src: '', // 视频播放地址 src: '', // 视频播放地址
spareSrc: 'http://pd4t7ae3m.bkt.clouddn.com/test.mp4' // 正常视频播放地址,浏览器不支持时,使用备用地址 spareSrc: 'https://pd4t7ae3m.bkt.clouddn.com/test.mp4' // 正常视频播放地址,浏览器不支持时,使用备用地址
}, },
/* 音频地址 */ /* 音频地址 */
audio: { audio: {
src: '', // 音频播放地址 src: '', // 音频播放地址
spareSrc: 'http://pd4t7ae3m.bkt.clouddn.com/audio-test.mp3', // 音频备用地址 spareSrc: 'https://pd4t7ae3m.bkt.clouddn.com/audio-test.mp3', // 音频备用地址
poster: 'http://pd4t7ae3m.bkt.clouddn.com/imgs-test3.jpg' // 音频播放封面 poster: 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test3.jpg' // 音频播放封面
}, },
/* PPT对象 */ /* PPT对象 */
image: { image: {
imgUrls: [ imgUrls: [
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test1.jpg', 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test1.jpg',
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test2.jpg', 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test2.jpg',
'http://pd4t7ae3m.bkt.clouddn.com/imgs-test3.jpg' 'https://pd4t7ae3m.bkt.clouddn.com/imgs-test3.jpg'
], // 所有图片数组 ], // 所有图片数组
current: 0, // 当前跟着音视频走,播放的是第几个图片 current: 0, // 当前跟着音视频走,播放的是第几个图片
selectIndex: 0, selectIndex: 0,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论