[LayaAirIDE3]laya3.0 VideoNode视频遮罩无法播放问题


使用的是LayaAir3.1.3,需要制作带有圆角的视频播放界面,但是当对VideoNode添加遮罩的时候,会导致视频界面不显示,但有视频声音传出。
同位置放置一张图像,可以正常使用遮罩;不加遮罩的时候,视频也可以正常显示
哪位大神看到了,帮忙解决一下,还是说是我哪里设置的问题(由于界面显示原因,无法使用浏览器的视频生成界面)

 
const { regClass, property } = Laya;

@regClass()
export class MainTest extends Laya.Script {

@property(Laya.VideoNode)
public m_VideoNode: Laya.VideoNode;
@property(Laya.Image)
public m_Image: Laya.Image;
@property(Laya.Button)
public m_Button: Laya.Button;

onAwake(): void {
this.m_Button.on(Laya.Event.CLICK, this, () => {
this.m_VideoNode.play();
this.m_VideoNode.loop = true;
});
}

onEnable(): void {
var spriteMask: Laya.Sprite = new Laya.Sprite();
spriteMask.graphics.drawCircle(0, 0, 100, "#fff000", null, 1);
spriteMask.pos(300, 300);
this.m_VideoNode.mask = spriteMask;
//this.m_Image.mask = spriteMask;
}
}
微信图片_20240628182409.png 微信图片_20240628182402.png 微信图片_20240628182415.png
已邀请:

要回复问题请先

商务合作
商务合作