Attempt to let the game fit both Portrait & Landscape orientation

First of all, my game is in Landscape.

I changed my WebGL template to make my game perfectly fit the browser in Landscape.

So, my current approach is when the player rotate to Portrait, I popped a overlay telling the player to rotate back to Landscape, which works fine.

However, I’ve seen some game having the ability to fit both Portrait & Landscape orientation. By rotating entire Landscape game, the game are able to fit in Potrait mode perfectly. I wondering how can I achieve this, as I currently only can think of 2 approaches :

  1. Working in Unity3D, using 2 camera with some tricks (not sure how yet).
  2. Working with HTML & styling in WebGL Template

So I would like to have some hint from you guys if any of you ever made this worked before Please give me some idea for this.

THANKS!