html全屏:禁用android上的状态栏

时间:2018-03-07 11:32:45

标签: android fullscreen html5-fullscreen

我注意到在升级到Android 8后,状态栏不再隐藏在Chrome上html5全屏。有没有办法隐藏这个?以前的Android版本不是这种情况。

Chrome: 64.0.3282.137

操作系统:Android 8.0.0,HTC 10 Build / OPR1.170623.0267

$([fullscreenButton, fullscreenSideButton]).on('click', function(){
    self.goFullScreen();
});
goFullScreen: function(){
    var self = this;
    var viewel = document.getElementById('viewer-container');
    if(viewel.requestFullscreen) {
        viewel.requestFullscreen();
    } else if (viewel.webkitRequestFullscreen) {
        viewel.webkitRequestFullscreen();
    } else if (viewel.mozRequestFullScreen) {
        viewel.mozRequestFullScreen();
    } else if (viewel.msRequestFullscreen) {
        viewel.msRequestFullscreen();
    }
},

Screenshot

0 个答案:

没有答案