@mikeaich @davidflanagan But I think what really matters here is that we only need to confirm that W and H of preview given here are "before rotating". As long as this is confirmed, the code here works.

since sensorAngle also represents the "direction of preview", for example, if the sensorAngle is 0 degree, that means the preview we get is orientated just the same as the screen. In other words, we don't have to rotate the preview to get it display in right direction. So, to make the preview cover the screen, what we need to compare is still `res.height >= screenHeight && res.width >= screenWidth`; No exchanging width and height needed. Similar case in 180 degree. Actually in all devices I tested, the camera would be mounted in 0/180 degree only if the screen of device is in landscape (e.g. Flatfish). Other portrait devices are mounted in 90/270.