Commit a89d57ab authored by 李维's avatar 李维

调整视频提示按钮在提交以后再出现

parent d8fe8927
......@@ -2516,6 +2516,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 视频播放题型
currentVideoPlay = null;
videoDuration = 0;
allTipVideos = [];
setOneVideoBtn(contentData, hotZoneItemData, debugMode=false) {
const rect = this.newRectNode(hotZoneItemData, layer_4, debugMode);
const aniAudio = cc.instantiate(this.aniVideoTips)
......@@ -2528,13 +2529,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
aniAudio.height = rect.height;
rect.addChild(aniAudio);
rect.on("click", async () => {
if(this.submitted) {
return;
}
this.showVideoLayer();
const videoplayer = cc.find("Canvas/VideoPlayerContainer/videoPlayer").getComponent(cc.VideoPlayer)
videoplayer.stayOnBottom = true;
videoplayer.remoteURL = contentData.video_url;
if( videoplayer.remoteURL != contentData.video_url ) {
videoplayer.remoteURL = contentData.video_url;
}
this.videoDuration = await asyncGetVideoDuration(videoplayer);
// 设置进度条的起始和结束标签
this.videoControlBar.emit("set_duration", this.videoDuration)
......@@ -2544,6 +2544,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
videoplayer.play();
this.videoControlBar.emit("update_video_status", 1);
})
rect.active = false;
this.allTipVideos.push(rect);
};
// 画图计数,用于同时打开多个画图板控制页面滚动的
......@@ -3055,6 +3057,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
if(this.btnReplay) {
this.btnReplay.active = true;
}
// 显示所有视频提示
this.allTipVideos.forEach(videoRect=>{
videoRect.active = true;
})
}
// 重新玩
......@@ -3075,6 +3082,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.currentVideoPlay = null;
this.videoDuration = null;
this.drawingCount = 0;
this.allTipVideos = [];
this.startTimestamp = new Date().getTime();
// 停止当前正在播放的音乐
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment