Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

pointerdown on PIXI object doesn't count as user gesture

$
0
0

I want to make a fullscreen button inside the stage.
I added on pointerdown to a PIXI.Sprite like this:

fullscreenbutton.on('pointerdown', function(e){
    fullscreen();
}

On my Android device I get:

Quote

Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.


The same function works just fine on

<button onclick="fullscreen">Full Screen!</button>

 

Is it possible to somehow register pointerdown on PIXI.Sprite as user gesture?
Or do I have to position-absolute the HTML button on top of canvas and there is no other way?


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>