Closed
Description
Version
- Phaser Version: 3.52.0
- Operating system: macOS
- Browser: Chrome
Description
When setting displayOrigin on a Video that is loaded with its loadURL
function, it does not show up. It works if the video is loaded via key, or if setOrigin is used instead.
Example Test Code
Go to https://labs.phaser.io/edit.html?src=src/game%20objects/video/play%20video.js&v=3.52.0 and copy/paste the code below
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
backgroundColor: '#2d2d2d',
parent: 'phaser-example',
scene: {
preload: preload,
create: create
}
};
var game = new Phaser.Game(config);
function preload ()
{
this.load.video('wormhole', 'assets/video/wormhole.mp4', 'loadeddata', false, true);
}
function create ()
{
var vid = this.add.video(400, 300, /* 'wormhole' */) // if key is specified and loadURL is taken out, it works
vid.loadURL('assets/video/wormhole.mp4')
vid.setDisplayOrigin(0, 0) // breaks video when loaded with loadURL
vid.play(true);
}