|
@@ -505,21 +505,22 @@ export default {
|
|
var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
var polyvPlayerContext = this.selectComponent('#playerVideo');
|
|
let totalVideoTime = polyvPlayerContext.getDuration()
|
|
let totalVideoTime = polyvPlayerContext.getDuration()
|
|
let duration = polyvPlayerContext.getCurrentTime()
|
|
let duration = polyvPlayerContext.getCurrentTime()
|
|
|
|
+ let photoNum = this.photoNum
|
|
if(!this.photoConfig){
|
|
if(!this.photoConfig){
|
|
this.photoConfig = true
|
|
this.photoConfig = true
|
|
- let spaceTime = Math.floor(totalVideoTime/this.photoNum) //拍照时间区间
|
|
|
|
|
|
+ let spaceTime = Math.floor(totalVideoTime/photoNum) //拍照时间区间
|
|
if(spaceTime<5){//区间小于5秒
|
|
if(spaceTime<5){//区间小于5秒
|
|
- this.photoNum = Math.floor(totalVideoTime/5)
|
|
|
|
|
|
+ photoNum = Math.floor(totalVideoTime/5)
|
|
spaceTime = 5
|
|
spaceTime = 5
|
|
}
|
|
}
|
|
- if(this.photoNum<1){
|
|
|
|
- this.photoNum = 1 //只要设置,至少拍一次
|
|
|
|
|
|
+ if(photoNum<1){
|
|
|
|
+ photoNum = 1 //只要设置,至少拍一次
|
|
spaceTime = totalVideoTime
|
|
spaceTime = totalVideoTime
|
|
}
|
|
}
|
|
let initSpace = 0
|
|
let initSpace = 0
|
|
//没有历史拍照间隔数据
|
|
//没有历史拍照间隔数据
|
|
if(this.photoList.length==0){
|
|
if(this.photoList.length==0){
|
|
- for(let i=0;i<this.photoNum;i++){
|
|
|
|
|
|
+ for(let i=0;i<photoNum;i++){
|
|
let s = this.randomNum(initSpace,initSpace+spaceTime)
|
|
let s = this.randomNum(initSpace,initSpace+spaceTime)
|
|
if(s>totalVideoTime){
|
|
if(s>totalVideoTime){
|
|
s = totalVideoTime-1
|
|
s = totalVideoTime-1
|
|
@@ -530,7 +531,7 @@ export default {
|
|
this.photoList.push(s)
|
|
this.photoList.push(s)
|
|
initSpace+=spaceTime
|
|
initSpace+=spaceTime
|
|
}
|
|
}
|
|
- console.log(this.photoList,"随机拍照时间数组11",this.photoNum,initSpace,spaceTime)
|
|
|
|
|
|
+ console.log(this.photoList,"随机拍照时间数组11",photoNum,initSpace,spaceTime)
|
|
this.postCoursePhotoRecord(true)//提交随机拍照时间数组
|
|
this.postCoursePhotoRecord(true)//提交随机拍照时间数组
|
|
}
|
|
}
|
|
console.log(this.photoList,"随机拍照时间数组")
|
|
console.log(this.photoList,"随机拍照时间数组")
|