Newer versions of Phaser (3.60 and on) seem to be dropping video frames when opening my phaser project in an Android app’s WebView. In other words, if I try to open my project, which is hosted online, from within an Android app I am seeing video frames consistently dropped. Any idea why this is happening?
Video resolution: 480x360 Video size: 529KB Android:15
To test, I am using this WebView Testing app, which just allows you to open a URL within Android: https://play.google.com/store/apps/details?id=com.snc.test.webview2&hl=en_US
And this simple video play code:
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser-arcade-physics.min.js"></script>
</head>
<body>
<script>
class Example extends Phaser.Scene
{
constructor ()
{
super();
}
preload ()
{
console.log("Loading");
this.load.video('video_1', 'test_video.mp4', true);
this.video;
}
create ()
{
this.video = this.add.video(this.cameras.main.centerX, this.cameras.main.centerY, 'video_1');
this.input.on('pointerdown', () => {
this.video.play();
});
}
}
const config = {
renderer: Phaser.CANVAS,
width: 480,
height: 320,
scene: Example,
};
let game = new Phaser.Game(config);
</script>
</body>
</html>
The video runs fine if I roll back the phaser version:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/phaser-arcade-physics.min.js"></script>
Adjusting the renderer does not seem to have an effect in newer versions.
Thanks!