如何让psvita浏览器全屏?

时间:2018-01-22 12:56:43

标签: javascript html5-fullscreen

我想写一个html页面使我的psvita浏览器全屏显示,而像requestFullscreen()mozRequestFullScreen()msRequestFullscreen()webkitRequestFullScreen()这样的JavaScript API不起作用。

这是html: <button onclick="launchFullscreen(document.documentElement)">FullScreen</button>

这是JavaScript:

function launchFullscreen(element) {
  if(element.requestFullscreen) {
    element.requestFullscreen();
  } else if(element.mozRequestFullScreen) {
    element.mozRequestFullScreen();
  } else if(element.msRequestFullscreen){
    element.msRequestFullscreen();
  } else if(element.webkitRequestFullscreen) {
    element.webkitRequestFullScreen();
  }
}

0 个答案:

没有答案