楼主这个解决了吗。。 |
本帖最后由 汪汪 于 2017-11-6 22:20 编辑 视频是在网页的另外一个层吧... 找到video的元素 ,也就是类似 var video = document.createElement('video'); var texture = PIXI.VideoTexture.textureFromVideo( video); var sprite = new PIXI.Sprite(texture); sprite.width = w sprite.height = h 然后把精灵放到场景里去就好 差不多 就是 Graphics._createVideo = function() { this._videoFrame = document.createElement('div'); this._videoFrame.id = 'GameVideoFrame'; this._video = document.createElement('video'); //也就是 把 Graphics._video 当作上面的 video , 然后把精灵添加到场景中就好了 this._video.id = 'GameVideo'; this._videoVisible = false; // 这句注释掉 document.body.appendChild(this._videoFrame); // 这句注释掉 this._videoFrame.appendChild(this._video); this.setVideoContentsPosition(0, 0); this.setVideoContentsScale(1.0, 1.0); this._updateVideo(); this._centerElement(this._video); this._video.style.margin = 0; this._videoLoading = false; }; |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-12-2 16:07
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.