Commit 1f12e7aa authored by 李维's avatar 李维

调整Mask SF

parent 957263b0
...@@ -564,6 +564,7 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -564,6 +564,7 @@ export default class VideoPlayerComponent extends cc.Component {
isVideoFull: boolean = false; isVideoFull: boolean = false;
tempPos: any = null; tempPos: any = null;
maskSFSaved = null;
fullScreen() { fullScreen() {
if (this.isVideoFull) { if (this.isVideoFull) {
return; return;
...@@ -591,6 +592,8 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -591,6 +592,8 @@ export default class VideoPlayerComponent extends cc.Component {
const maskCom = videoContainer.getComponent(cc.Mask); const maskCom = videoContainer.getComponent(cc.Mask);
maskCom.type = cc.Mask.Type.RECT; maskCom.type = cc.Mask.Type.RECT;
this.maskSFSaved = maskCom.spriteFrame;
cc.find(`Canvas/videolist`).active = false; cc.find(`Canvas/videolist`).active = false;
const controls = cc.find(`Canvas/Controls`); const controls = cc.find(`Canvas/Controls`);
...@@ -643,6 +646,9 @@ export default class VideoPlayerComponent extends cc.Component { ...@@ -643,6 +646,9 @@ export default class VideoPlayerComponent extends cc.Component {
const maskCom = videoContainer.getComponent(cc.Mask); const maskCom = videoContainer.getComponent(cc.Mask);
maskCom.type = cc.Mask.Type.IMAGE_STENCIL; maskCom.type = cc.Mask.Type.IMAGE_STENCIL;
maskCom.spriteFrame = this.maskSFSaved;
maskCom.alphaThreshold = 0.1;
maskCom.inverted = true;
cc.find(`Canvas/videolist`).active = this.data.dataArr.length>1; cc.find(`Canvas/videolist`).active = this.data.dataArr.length>1;
......
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