This gist support scaling Phaser game to fill the screen on mobile game and web browser without stretching. The approach is fixing one of the measures (width or height) and then set the other measure accordingly to keep the aspect ratio.
NOTICE: This won't resize the canvas on window resize (device rotated).
As default, the height is fixed with FIXED_MEASURE = 'Height'
.
Set FIXED_MEASURE = 'Width'
to set width as the fixed measure.
Change FIXED_SIZE
to scale the game bigger or smaller. Meaning more pixels to render or less, while the canvas would still fill the screen.