onClick(){
this.initVideo();
}
initVideo() {
this.htmlvideo = new Laya.HtmlVideo();
this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1);
this.htmlvideo.video.addEventListener("loadedmetadata",()=>{
var videoTexture:Laya.VideoTexture = new Laya.VideoTexture();
videoTexture.video = this.htmlvideo.video;
videoTexture.video.play();
videoTexture.video.loop = true;
var texture2D = new Laya.Texture2D(videoTexture.video.videoWidth,videoTexture.video.videoHeight);
var texture:Laya.Texture = new Laya.Texture(texture2D);
3 个回复
Laya_XS
赞同来自:
如果使用上述代码遇到问题,在继续提交新问题。
Laya_XS
赞同来自:
1704355232用户
赞同来自: