<view class="show-video">
<video id="myVideo" :poster="poster" :src="src" :autoplay="true" @error="videoErrorCallback" enable-danmu
x5-video-player-type="h5-page" x5-video-player-fullscreen="true" x5-video-orientation="portraint"
webkit-playsinline="true" @timeupdate="timeGet" @ended="ended" @pause="pause">
</video>
</view>
getCousesDetails() { //获取课程详情
var _this = this;
comm.http.get({
url: '/api/Course/' + this.$data.GetID,
isShowLoading: true,
success(res) {
console.log("课程详情", res);
_this.nbTitle = res.Entity.SubCourseName;
_this.CourseInfo = res.Entity;
_this.src = comm.getMapFilePath(_this.CourseInfo.Video.Path);
_this.poster = comm.getFullFilePath(_this.CourseInfo.ImgId);
if (res.StudyRecord) {
console.log("上次播放记录", res.StudyRecord.PlayedTime)
uni.showToast(res.StudyRecord)
_this.initialtime = res.StudyRecord.PlayedTime;
_this.seekeek();
}
}
})
},
seekeek(){
this.videoContext.seek(this.$data.initialtime);
},