I need to run Canvas rendering mode if the user runs on an mobile safari version like iPad or iPhone. I found this nice feature in the phaser codebase phaser/Browser.js at master · photonstorm/phaser · GitHub .
But I need to be able to use this before the phaser game is instantiated.
My game is written in a typescript environment and I tried this import statement.
import * as Browser from "phaser/src/device/Browser";
But Browser appears as undefined. I don’t know js/ts module systems that well. Does anybody know how I can achieve this?