Detecting screen mode in the Client Side API