我有个小程序是视频购买后才能观看的,设置的是1分47秒前可以试看,超过时间弹框提示用户购买。这两天有用户反馈观看到59秒,播放进度会卡住,但是视频在播放,请问是什么原因?
这是客户反馈的截图
用户手机信息
"brand":"vivo","deviceBrand":"vivo","deviceModel":"V2329A","hostName":"WeChat","hostSDKVersion":"3.8.8","hostVersion":"8.0.60","memorySize":15203,"system":"Android 15","platform":"android"
代码如下:
<video class="video_data" id="myVideo" :src="videoUrl" :poster="imgUrl+info.thumb" controls @timeupdate="videoTimeUpdateEvent" @waiting="handleWaiting" @play="handlePlaying" @error="handleError" :show-background-playback-button="info.is_buy?true:false"></video>
videoTimeUpdateEvent(e) {
console.log('videoTimeUpdateEvent:',e)
// e.detail.currentTime为每次触发时,视频的当前播放时间
let that = this
let currentTime = Number(e.detail.currentTime);
if (this.isWaiting) { // 上报等待时间
const now = Date.now();
this.endStall(now)
}
// 试看结束 this.class_info.freed_time为试看时间
if (currentTime > this.info.trial_min && this.info.is_buy < 1) { // trial_min 观看时长 is_buy 是否已购买
// 试看结束,在这做一些想做的操作,例如停止视频播放
this.videoContext.exitFullScreen();
this.videoContext.pause();
this.videoContext.seek(this.info.trial_min);
this.showAlertModel(this.isFirstCheck)
this.isFirstCheck = false
}
},
