尝试解决时间乱跳的问题
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
"type" : "uni-app:app-ios"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -450,6 +450,7 @@
|
||||
var ReplayVideoFlag = false
|
||||
var curStatus = null
|
||||
var diff = 0
|
||||
var pauseTime = 0
|
||||
var myplayer = undefined
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
@@ -582,10 +583,11 @@
|
||||
this.player.dispose();
|
||||
$('#url-player-test').empty();
|
||||
this.player = null;
|
||||
myplayer = null
|
||||
myplayer = undefined
|
||||
|
||||
console.log('上一条视频的状态,',this.player.getStatus());
|
||||
}
|
||||
pauseTime = 0
|
||||
var fullScreenButtonComponent = Aliplayer.Component({
|
||||
/**
|
||||
* 初始函数,在new对象时调用
|
||||
@@ -789,9 +791,10 @@
|
||||
})
|
||||
player.on('play', function() {
|
||||
console.log('开始播放------');
|
||||
|
||||
$('.videoContent7').click()
|
||||
|
||||
if(pauseTime > 0){
|
||||
player.seek(pauseTime);
|
||||
}
|
||||
})
|
||||
player.one('canplay', function() {
|
||||
// console.log('这是ios数据缓冲初次设置播放位置判断!!!!', videoData)
|
||||
@@ -813,6 +816,7 @@
|
||||
console.log('正在播放...')
|
||||
|
||||
})
|
||||
|
||||
this.player.on('timeupdate', function() {
|
||||
let that = this
|
||||
var _time = parseInt(player.getCurrentTime())
|
||||
@@ -834,10 +838,12 @@
|
||||
$('.videoContent2').click()
|
||||
$('.videoContent6').click()
|
||||
})
|
||||
this.player.on('pause', function() {
|
||||
console.log('触发暂停')
|
||||
this.player.pause(true)
|
||||
player.on('pause', function() {
|
||||
pauseTime = parseInt(player.getCurrentTime())
|
||||
player.pause(true)
|
||||
console.log('触发暂停', pauseTime)
|
||||
})
|
||||
|
||||
this.player.on('error', function() {
|
||||
console.log('播放出错')
|
||||
$('.videoContent5').click()
|
||||
|
||||
Reference in New Issue
Block a user