|
@@ -3,6 +3,13 @@
|
|
|
<uni-nav-bar v-if="isShowBar" left-icon="back" :statusBar="true" fixed="true"
|
|
<uni-nav-bar v-if="isShowBar" left-icon="back" :statusBar="true" fixed="true"
|
|
|
:title="detail.courseName || '课程详情'" @clickLeft="clickLeft"></uni-nav-bar>
|
|
:title="detail.courseName || '课程详情'" @clickLeft="clickLeft"></uni-nav-bar>
|
|
|
<view id="top">
|
|
<view id="top">
|
|
|
|
|
+ <uni-popup ref="popup" :mask-click="false" v-if="goodsData.reminderSign===1">
|
|
|
|
|
+ <view style="background: #d6acac;
|
|
|
|
|
+ color: #ff3535;
|
|
|
|
|
+ padding: 10px;"><text>禁止倍速或拖拽观看,否则学习无效</text>
|
|
|
|
|
+ <icon type="cancel" style="float: right;color:#ff3535;" @click="closepopup" size="26" />
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </uni-popup>
|
|
|
<view class="video_box" v-if="!playVid">
|
|
<view class="video_box" v-if="!playVid">
|
|
|
<image :src="$method.splitImgHost(goodsData.coverUrl)" mode="widthFix"
|
|
<image :src="$method.splitImgHost(goodsData.coverUrl)" mode="widthFix"
|
|
|
style="width: 100%; height: 421rpx">
|
|
style="width: 100%; height: 421rpx">
|
|
@@ -102,6 +109,14 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</u-popup>
|
|
</u-popup>
|
|
|
|
|
+ <u-modal v-model="noticeShow2" title="提示" @confirm="resetSection" confirm-text="返回重学"
|
|
|
|
|
+ :show-cancel-button="false">
|
|
|
|
|
+ <view class="slot-content">
|
|
|
|
|
+ <text> 系统检测您在学习过程中有拖拽或快进行为,请重新学习!倒计时</text>
|
|
|
|
|
+ <text v-if="CountTo2 >= 0" style="color: orange;">{{ " " + CountTo2 + "s " }} </text>
|
|
|
|
|
+ <text> 秒后自动返回重学</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-modal>
|
|
|
<u-modal v-model="showMark" title="提示" @confirm="markConfirm" @cancel="toBack" confirm-text="复制学习网址"
|
|
<u-modal v-model="showMark" title="提示" @confirm="markConfirm" @cancel="toBack" confirm-text="复制学习网址"
|
|
|
:show-cancel-button="true" cancel-text="关闭">
|
|
:show-cancel-button="true" cancel-text="关闭">
|
|
|
<view class="slot-content">
|
|
<view class="slot-content">
|
|
@@ -175,6 +190,7 @@
|
|
|
</u-popup>
|
|
</u-popup>
|
|
|
<!-- 摄像头 -->
|
|
<!-- 摄像头 -->
|
|
|
<Popup-camera @submitPhoto="submitPhoto" :visible.sync="showCamera" ref="camera" />
|
|
<Popup-camera @submitPhoto="submitPhoto" :visible.sync="showCamera" ref="camera" />
|
|
|
|
|
+ <Popup-media @submitTakeVideo="submitTakeVideo" :visible.sync="showMedia" ref="media" />
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -182,6 +198,7 @@
|
|
|
import handoutsBox from "@/components/course/handoutsBox.vue";
|
|
import handoutsBox from "@/components/course/handoutsBox.vue";
|
|
|
import courseTree from "@/components/course/courseTree.vue";
|
|
import courseTree from "@/components/course/courseTree.vue";
|
|
|
import PopupCamera from "../../components/popup/camera.vue";
|
|
import PopupCamera from "../../components/popup/camera.vue";
|
|
|
|
|
+ import PopupMedia from "../../components/popup/media.vue";
|
|
|
import myPlayer from "@/components/myPlayer/polyvPlayer.vue";
|
|
import myPlayer from "@/components/myPlayer/polyvPlayer.vue";
|
|
|
import myPlayer2 from "@/components/myPlayer2/tcPlayer.vue";
|
|
import myPlayer2 from "@/components/myPlayer2/tcPlayer.vue";
|
|
|
import noteBox from "@/components/course/noteBox.vue";
|
|
import noteBox from "@/components/course/noteBox.vue";
|
|
@@ -207,6 +224,7 @@
|
|
|
answerBox,
|
|
answerBox,
|
|
|
courseTree,
|
|
courseTree,
|
|
|
PopupCamera,
|
|
PopupCamera,
|
|
|
|
|
+ PopupMedia,
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -223,6 +241,7 @@
|
|
|
goodsId: 0,
|
|
goodsId: 0,
|
|
|
goodsData: {},
|
|
goodsData: {},
|
|
|
showCamera: false,
|
|
showCamera: false,
|
|
|
|
|
+ showMedia: false,
|
|
|
goodsPlayConfig: null,
|
|
goodsPlayConfig: null,
|
|
|
autoplay: false,
|
|
autoplay: false,
|
|
|
isAllowSeek: "no",
|
|
isAllowSeek: "no",
|
|
@@ -274,7 +293,15 @@
|
|
|
beforeHideIsPlaying: false,
|
|
beforeHideIsPlaying: false,
|
|
|
isLeave: false,
|
|
isLeave: false,
|
|
|
text: "",
|
|
text: "",
|
|
|
- throttleFn: throttle(this.postStudyRecord, 15000)
|
|
|
|
|
|
|
+ isShowpopuptips: true,
|
|
|
|
|
+ throttleFn: throttle(this.postStudyRecord, 15000),
|
|
|
|
|
+ needtoTakeVideo: false, //是否需要随机录制2秒视频
|
|
|
|
|
+ timeNeedtoTakeVideo: null, //需要随机录制2秒视频定时器
|
|
|
|
|
+ curPlayOver: false, //当前视频已播放完毕
|
|
|
|
|
+ noticeShow2: false,
|
|
|
|
|
+ CountTo2: 0,
|
|
|
|
|
+ CountTo2Times: null,
|
|
|
|
|
+ reerrorcode:0,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -402,8 +429,41 @@
|
|
|
if (!this.userInfo) {
|
|
if (!this.userInfo) {
|
|
|
await this.$store.dispatch('getUserInfo')
|
|
await this.$store.dispatch('getUserInfo')
|
|
|
}
|
|
}
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+ if (this.userInfo.slabSign == 1) {
|
|
|
|
|
+ if (this.$method.isIPad()) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: "提示",
|
|
|
|
|
+ content: "暂不支持使用iPad学习,请使用普通手机打开",
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ complete: () => {
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
|
+ url: "/pages/learn/index",
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.$method.isTablet()) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: "提示",
|
|
|
|
|
+ content: "当前页面暂不支持使用平板学习",
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ complete: () => {
|
|
|
|
|
+ uni.switchTab({
|
|
|
|
|
+ url: "/pages/learn/index",
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
this.saveLoaclCheckClass(Number(option.orderGoodsId))
|
|
this.saveLoaclCheckClass(Number(option.orderGoodsId))
|
|
|
this.init();
|
|
this.init();
|
|
|
|
|
+ // this.openMedia();
|
|
|
|
|
+ // this.showCamera=true;
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
async onShow() {
|
|
async onShow() {
|
|
|
if (!this.$method.isLogin()) {
|
|
if (!this.$method.isLogin()) {
|
|
@@ -521,6 +581,9 @@
|
|
|
await this.isCanLearn();
|
|
await this.isCanLearn();
|
|
|
this.courseCourseList();
|
|
this.courseCourseList();
|
|
|
},
|
|
},
|
|
|
|
|
+ closepopup() {
|
|
|
|
|
+ this.goodsData.reminderSign = 0;
|
|
|
|
|
+ },
|
|
|
// 七大员是否能进入学习
|
|
// 七大员是否能进入学习
|
|
|
async qCheckIsCanLearn() {
|
|
async qCheckIsCanLearn() {
|
|
|
let res = await this.$api.qCheckIsCanLearn(this.orderGoodsId);
|
|
let res = await this.$api.qCheckIsCanLearn(this.orderGoodsId);
|
|
@@ -1172,7 +1235,6 @@
|
|
|
data
|
|
data
|
|
|
} = await this.$api.goodsDetail(this.goodsId);
|
|
} = await this.$api.goodsDetail(this.goodsId);
|
|
|
this.goodsData = data.data;
|
|
this.goodsData = data.data;
|
|
|
-
|
|
|
|
|
if (data.data.firstChoiceStatus) {
|
|
if (data.data.firstChoiceStatus) {
|
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
|
url: `/pages3/polyv/preference?courseId=${this.courseId}&goodsId=${data.data.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${data.data.gradeId}&minClassHour=${data.data.minClassHour || 0}`,
|
|
url: `/pages3/polyv/preference?courseId=${this.courseId}&goodsId=${data.data.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${data.data.gradeId}&minClassHour=${data.data.minClassHour || 0}`,
|
|
@@ -1274,6 +1336,10 @@
|
|
|
if ((this.photoConfig && this.photoList.length) || !this.isPlaying) {
|
|
if ((this.photoConfig && this.photoList.length) || !this.isPlaying) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ //计算录视频逻辑
|
|
|
|
|
+ if (this.needtoTakeVideo) {
|
|
|
|
|
+ this.takeVideoLogic();
|
|
|
|
|
+ }
|
|
|
let totalVideoTime = this.refPlv.getDuration();
|
|
let totalVideoTime = this.refPlv.getDuration();
|
|
|
this.photoConfig = true;
|
|
this.photoConfig = true;
|
|
|
if (this.erJianErZao) {
|
|
if (this.erJianErZao) {
|
|
@@ -1374,6 +1440,10 @@
|
|
|
// 查找拍照历史
|
|
// 查找拍照历史
|
|
|
if ((this.photoNum > 0 || this.jjShiGongYuan || this.erJianErZao) && learning != 1) {
|
|
if ((this.photoNum > 0 || this.jjShiGongYuan || this.erJianErZao) && learning != 1) {
|
|
|
await this.getPhotoLastRecord();
|
|
await this.getPhotoLastRecord();
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+ this.curPlayOver = false;
|
|
|
|
|
+ await this.getCheckTakeVideo(); //获取是否需要随机录制3秒视频
|
|
|
|
|
+ // #endif
|
|
|
}
|
|
}
|
|
|
if (this.refPlv) {
|
|
if (this.refPlv) {
|
|
|
if (this.playSource == 2) {
|
|
if (this.playSource == 2) {
|
|
@@ -1512,6 +1582,25 @@
|
|
|
});
|
|
});
|
|
|
this.closeCamera();
|
|
this.closeCamera();
|
|
|
return
|
|
return
|
|
|
|
|
+ } else if (code == 557 || code == 5581 || code == 5591) {
|
|
|
|
|
+ this.refPlv.playPause();
|
|
|
|
|
+ this.refPlv.exitFullScreen();
|
|
|
|
|
+ this.CountTo2 = 180;
|
|
|
|
|
+ this.noticeShow2 = true;
|
|
|
|
|
+ this.reerrorcode=code;
|
|
|
|
|
+ if (this.CountTo2Times) {
|
|
|
|
|
+ clearInterval(this.CountTo2Times);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.CountTo2Times = setInterval(() => {
|
|
|
|
|
+ if (this.CountTo2 <= 0) {
|
|
|
|
|
+ clearInterval(this.CountTo2Times);
|
|
|
|
|
+ this.noticeShow2 = false;
|
|
|
|
|
+ this.resetSection(); //重置
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.CountTo2--;
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ return
|
|
|
} else if (code == 558) {
|
|
} else if (code == 558) {
|
|
|
this.CountTo1 = msg.split(",")[1];
|
|
this.CountTo1 = msg.split(",")[1];
|
|
|
this.noticeShow1 = true;
|
|
this.noticeShow1 = true;
|
|
@@ -1544,6 +1633,41 @@
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ resetSection() {
|
|
|
|
|
+ if (this.CountTo2Times) {
|
|
|
|
|
+ clearInterval(this.CountTo2Times);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.reerrorcode==557)
|
|
|
|
|
+ {
|
|
|
|
|
+ this.reerrorcode=0;
|
|
|
|
|
+ uni.navigateBack();
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(this.reerrorcode==5581||this.reerrorcode==5591){
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ ...this.params([
|
|
|
|
|
+ "orderGoodsId",
|
|
|
|
|
+ "courseId",
|
|
|
|
|
+ ]),
|
|
|
|
|
+ sectionId: this.sectionId || 0,
|
|
|
|
|
+ errorCode:this.reerrorcode,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.reerrorcode=0;
|
|
|
|
|
+ this.$api
|
|
|
|
|
+ .resetSection(data)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ console.log(res, "记录返回");
|
|
|
|
|
+ let {
|
|
|
|
|
+ code,
|
|
|
|
|
+ msg
|
|
|
|
|
+ } = res.data;
|
|
|
|
|
+ uni.navigateBack();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ uni.navigateBack();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
timeEvent(time) {
|
|
timeEvent(time) {
|
|
|
console.log(this.refPlv.getDuration(), 'getDurationgetDuration')
|
|
console.log(this.refPlv.getDuration(), 'getDurationgetDuration')
|
|
|
this.clearPauseTimer();
|
|
this.clearPauseTimer();
|
|
@@ -1595,6 +1719,13 @@
|
|
|
},
|
|
},
|
|
|
openCamera() {
|
|
openCamera() {
|
|
|
if (this.showCamera) return;
|
|
if (this.showCamera) return;
|
|
|
|
|
+ if (this.showMedia) //如果正在录制视频,则5秒后再弹出
|
|
|
|
|
+ {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.openCamera();
|
|
|
|
|
+ }, 5000);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.showCamera = true;
|
|
this.showCamera = true;
|
|
|
this.refPlv.playPause();
|
|
this.refPlv.playPause();
|
|
|
this.refPlv.exitFullScreen();
|
|
this.refPlv.exitFullScreen();
|
|
@@ -1615,9 +1746,15 @@
|
|
|
icon: "none",
|
|
icon: "none",
|
|
|
title: "播放完毕",
|
|
title: "播放完毕",
|
|
|
});
|
|
});
|
|
|
|
|
+ this.curPlayOver = true; //当前视频已播放完毕
|
|
|
|
|
+ if (this.needtoTakeVideo) {
|
|
|
|
|
+ this.openTakeVideo();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.clearPauseTimer();
|
|
this.clearPauseTimer();
|
|
|
await this.postStudyRecord(1);
|
|
await this.postStudyRecord(1);
|
|
|
this.nextSection();
|
|
this.nextSection();
|
|
|
|
|
+ this.curPlayOver = false;
|
|
|
},
|
|
},
|
|
|
playerError() {
|
|
playerError() {
|
|
|
console.log("播放错误");
|
|
console.log("播放错误");
|
|
@@ -1800,6 +1937,140 @@
|
|
|
) {
|
|
) {
|
|
|
return this.params(keys);
|
|
return this.params(keys);
|
|
|
},
|
|
},
|
|
|
|
|
+ //计算录视频逻辑
|
|
|
|
|
+ takeVideoLogic() {
|
|
|
|
|
+ if (!this.needtoTakeVideo) return;
|
|
|
|
|
+ if (!this.erJianErZao) return;
|
|
|
|
|
+ let totalVideoTime = this.refPlv.getDuration();
|
|
|
|
|
+ var duration = this.playTime;
|
|
|
|
|
+ var durtime = totalVideoTime - duration;
|
|
|
|
|
+ var takevideosec = this.randomNum(
|
|
|
|
|
+ durtime > 10 ? 10 : 1,
|
|
|
|
|
+ durtime > 310 ? durtime - 300 : durtime - 1
|
|
|
|
|
+ ); //多少秒后执行
|
|
|
|
|
+ clearTimeout(this.timeNeedtoTakeVideo);
|
|
|
|
|
+ this.timeNeedtoTakeVideo = setTimeout(() => {
|
|
|
|
|
+ this.openTakeVideo();
|
|
|
|
|
+ }, takevideosec * 1000);
|
|
|
|
|
+ console.log("多少秒后录制", takevideosec * 1000);
|
|
|
|
|
+ },
|
|
|
|
|
+ //启动录制视频
|
|
|
|
|
+ openTakeVideo() {
|
|
|
|
|
+ //console.log("showMedia",this.showMedia,this.showCamera)
|
|
|
|
|
+ if (!this.needtoTakeVideo) return;
|
|
|
|
|
+ if (this.showMedia) return;
|
|
|
|
|
+ if (this.showCamera) {
|
|
|
|
|
+ this.timeNeedtoTakeVideo = setTimeout(() => {
|
|
|
|
|
+ this.openTakeVideo();
|
|
|
|
|
+ }, 3000);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.showMedia = true;
|
|
|
|
|
+ console.log("showMedia2", this.showMedia, this.showCamera, "弹出录像")
|
|
|
|
|
+ this.refPlv.playPause();
|
|
|
|
|
+ this.refPlv.exitFullScreen();
|
|
|
|
|
+ },
|
|
|
|
|
+ //提交录制视频结果
|
|
|
|
|
+ postCourseVideoRecord(videoUrl) {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ var currentTime = this.playTime;
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ goodsId: this.goodsId,
|
|
|
|
|
+ gradeId: this.gradeId,
|
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
|
+ courseId: this.courseId,
|
|
|
|
|
+ moduleId: this.moduleId || 0,
|
|
|
|
|
+ chapterId: this.chapterId || 0,
|
|
|
|
|
+ sectionId: this.sectionId,
|
|
|
|
|
+ videoUrl: videoUrl,
|
|
|
|
|
+ videoCurrentTime: parseInt(currentTime > 0 ? currentTime : 0),
|
|
|
|
|
+ fromPlat: 2, // 来源平台 1小程序 2PC网站 3h5
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$api
|
|
|
|
|
+ .courseTakeVideoRecord(data)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ resolve(res);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ reject();
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ //获取是否需要随机录制2秒视频
|
|
|
|
|
+ async getCheckTakeVideo() {
|
|
|
|
|
+ return new Promise((resolve) => {
|
|
|
|
|
+ var data = {
|
|
|
|
|
+ sectionId: this.sectionId,
|
|
|
|
|
+ goodsId: this.goodsId,
|
|
|
|
|
+ courseId: this.courseId,
|
|
|
|
|
+ gradeId: this.gradeId,
|
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
|
+ chapterId: this.chapterId || 0,
|
|
|
|
|
+ moduleId: this.moduleId || 0,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$api.getCheckTakeVideo(data).then((res) => {
|
|
|
|
|
+ this.needtoTakeVideo = res.data.data > 0;
|
|
|
|
|
+ resolve();
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ async submitTakeVideo(url) {
|
|
|
|
|
+ //上传视频
|
|
|
|
|
+ //let file = this.$tools.convertBase64UrlToBlob(url);
|
|
|
|
|
+ try {
|
|
|
|
|
+ const file = new window.File([url], "video" + this.orderGoodsId.toString() + this.sectionId
|
|
|
|
|
+ .toString() + ".mp4", {
|
|
|
|
|
+ type: 'video/mp4',
|
|
|
|
|
+ });
|
|
|
|
|
+ // console.log(file, 'file')
|
|
|
|
|
+ var videoUrl = await this.$method.uploadFileH5(file, 6, {
|
|
|
|
|
+ gradeId: this.gradeId,
|
|
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
|
|
+ }, "video");
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ console.log(err, "err");
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: "上传接口报错,请重新录制上传",
|
|
|
|
|
+ icon: "none",
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ });
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.showMedia = true;
|
|
|
|
|
+ }, 1500);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.showMedia = false;
|
|
|
|
|
+ this.postCourseVideoRecord(videoUrl)
|
|
|
|
|
+ .then(async (res) => {
|
|
|
|
|
+ this.needtoTakeVideo = false;
|
|
|
|
|
+ if (this.curPlayOver) {
|
|
|
|
|
+ await this.ended();
|
|
|
|
|
+ }
|
|
|
|
|
+ //恢复播放
|
|
|
|
|
+ if (this.viewSign == 2) {
|
|
|
|
|
+ var polyvPlayerContext = this.player_tencent;
|
|
|
|
|
+ if (polyvPlayerContext && this.openPhotoStatus !== 1) {
|
|
|
|
|
+ polyvPlayerContext.play();
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ var polyvPlayerContext = this.player;
|
|
|
|
|
+ if (polyvPlayerContext && this.openPhotoStatus !== 1) {
|
|
|
|
|
+ polyvPlayerContext.j2s_resumeVideo();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.log(err, "err");
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: "上传接口报错,请重新录制上传",
|
|
|
|
|
+ icon: "none",
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ });
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.showMedia = true;
|
|
|
|
|
+ }, 1500);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
provide() {
|
|
provide() {
|
|
|
return {
|
|
return {
|