Commit 17d22488 authored by 李维's avatar 李维

修复暂停播放失效的问题

parent 683ddab7
...@@ -831,8 +831,8 @@ ...@@ -831,8 +831,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
3.5660000000000505, 3.566,
-173.50300000000007, -182.545,
0, 0,
0, 0,
0, 0,
......
...@@ -530,10 +530,16 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -530,10 +530,16 @@ export default class VideoPlayerComponent extends cc.Component {
this.videoPlayer.node.x = videoContainer.x; this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y; this.videoPlayer.node.y = videoContainer.y;
this.videoPlayer.play(); this.videoPlayer.play();
this.playButton.node.active = false;
this.pauseButton.node.active = true;
} }
pause() { pause() {
this.videoPlayer.pause(); this.videoPlayer.pause();
this.playButton.node.active = true;
this.pauseButton.node.active = false;
} }
forward() { forward() {
...@@ -582,7 +588,9 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -582,7 +588,9 @@ export default class VideoPlayerComponent extends cc.Component {
videoContainer.height = this.node.height; videoContainer.height = this.node.height;
videoContainer.x = 0; videoContainer.x = 0;
videoContainer.y = 0; videoContainer.y = 0;
console.log(this.tempPos.videoPos)
const maskCom = videoContainer.getComponent(cc.Mask);
maskCom.enabled = false;
cc.find(`Canvas/videolist`).active = false; cc.find(`Canvas/videolist`).active = false;
const controls = cc.find(`Canvas/Controls`); const controls = cc.find(`Canvas/Controls`);
...@@ -635,6 +643,9 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -635,6 +643,9 @@ export default class VideoPlayerComponent extends cc.Component {
this.videoPlayer.node.x = videoContainer.x; this.videoPlayer.node.x = videoContainer.x;
this.videoPlayer.node.y = videoContainer.y; this.videoPlayer.node.y = videoContainer.y;
const maskCom = videoContainer.getComponent(cc.Mask);
maskCom.enabled = true;
cc.find(`Canvas/videolist`).active = this.data.dataArr.length>1; cc.find(`Canvas/videolist`).active = this.data.dataArr.length>1;
const controls = cc.find(`Canvas/Controls`); const controls = cc.find(`Canvas/Controls`);
...@@ -674,25 +685,25 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -674,25 +685,25 @@ export default class VideoPlayerComponent extends cc.Component {
if (ct) { if (ct) {
this.updateBarByTime(ct); this.updateBarByTime(ct);
} }
// if (this.videoPlayer.isPlaying()) { if (this.videoPlayer.isPlaying()) {
// if (this.playButton.node.active) { if (this.playButton.node.active) {
// this.playButton.node.active = false; this.playButton.node.active = false;
// this.restartButton.node.active = false; this.restartButton.node.active = false;
// } }
// if (!this.pauseButton.node.active) { if (!this.pauseButton.node.active) {
// this.pauseButton.node.active = true; this.pauseButton.node.active = true;
// } }
// } else { } else {
// if (!this.playButton.node.active) { if (!this.playButton.node.active) {
// this.playButton.node.active = true; this.playButton.node.active = true;
// } }
// if (this.pauseButton.node.active) { if (this.pauseButton.node.active) {
// this.pauseButton.node.active = false; this.pauseButton.node.active = false;
// } }
// if (this.restartButton.node.active) { if (this.restartButton.node.active) {
// this.playButton.node.active = false; this.playButton.node.active = false;
// } }
// } }
} }
} }
} }
\ No newline at end of file
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