The values of meta viewport attribute are not reflected when in full screen mode in android chrome browser

前端 未结 2 658
长发绾君心
长发绾君心 2020-12-10 10:11

When I am in full screen mode in android using fullscreen api, the values of meta viewport attribute like initial-scale and user-scalable are not reflected in the browser. I

2条回答
  •  心在旅途
    2020-12-10 10:53

    I was able to go fullscreen by an alternative method using the web app manifest. It does not interfere with the meta viewport.

    Here are the steps

    1. Add this to the head section:
    
    
    1. Create a manifest file like the following:
     {
          "short_name": "App Name",
          "name": "Full app name",
          "icons": [
            {
              "src": "launcher-icon-4x.png",
              "sizes": "192x192",
              "type": "image/png"
            }
          ],
          "start_url": "/index.html",
          "display": "fullscreen",
          "orientation": "landscape"
      }
    

    The Google developers documentation to launch in fullscreen using a manifest is available here.

    The issue of fullscreen disabling the metaview port is raised here.

提交回复
热议问题