So, i need to call fullscreen request outside of phaser script.
But it’s keep prevent fullscreen request.
How to use fullscreen with phaser properly ? but outside of phaser script
I want to submit my game to a HTML5 game portal, but it’s require fullscreen request through their SDK.
JSfiddle https://jsfiddle.net/89mekxqp/1/
If i disable this, fullscreen just working fine
Edit: I downgraded phaser version to 3.15 and the fullscreen just working fine. so, scale manager that causing this issue? since scale manager are added on phaser 3.16 and above.
Here is the preview link http://cdn.redfoc.com/test/fullscreen_test
Source code
class Game1 extends Phaser.Scene {
constructor(){
super('game')
}
create(){
//
}
}
var config1 = {
type: Phaser.AUTO,
width: 300,
height: 500,
parent: ‘redfoc’,
scene: [Game1],
}
var game1 = new Phaser.Game(config1);
So, actually it’s just a blank project, if i not linked this script, fullscreen just working fine.
in mozilla, this is restricted for security. You did it with button is good. but you should add allow="fullscreen"
in tag.
where to put allow=“fullscreen” ? is it same as allowfullsceen ?
Update JSfiddle https://jsfiddle.net/89mekxqp/1/
inceabdullah:
allow=“fullscreen”
You should <iframe
tag with that setting: allow="fullscreen"
in my method.
You could edit iframe
what you want. I have just created temporary html page in my server: https://html5.ozguruygulama.com/tmp/