全屏模式使用localhost但不在firebase服务器上

时间:2016-04-13 12:34:49

标签: javascript jquery angularjs firebase firebase-hosting

我的网站位于“http://motostats.live/”,我正在使用全屏模式,可以在页面右上角访问。我正在使用jquery和全屏API进入全屏,在本地运行良好,也尝试角度全屏再次和工作正常,但很快我上传到firebase免费托管它创建一些框架集,我无法钻进?我相信这会使我的全屏代码中断。有人有想法吗?这是我的原始代码:

     function exitFullscreen(){

  $('.container').css({maxWidth: '1500px'});

  var el = $('html');

  if (el.exitFullscreen) {
    el.exitFullscreen();
  } else if (el.msExitFullscreen) {
    el.msExitFullscreen();
  } else if (el.mozCancelFullScreen) {
    el.mozCancelFullScreen();
  } else if (el.webkitExitFullscreen) {
    el.webkitExitFullscreen();
  }

  vm.fullscreen   = false;
}

function goFullscreen(){

  var el = $('html');

  $('.container').css({maxWidth: '100%'});

  if (el.requestFullscreen) {
    el.requestFullscreen();
  } else if (el.msRequestFullscreen) {
    el.msRequestFullscreen();
  } else if (el.mozRequestFullScreen) {
    el.mozRequestFullScreen();
  } else if (el.webkitRequestFullscreen) {
    el.webkitRequestFullscreen();
  }

  vm.fullscreen = true;

}

链接到angular-fullscreen的github:https://github.com/fabiobiondi/angular-fullscreen

此外,我的页面顶部曾经使用firebaseapp加载和联机 Also here is the top of my page once loaded and online with firebaseapp

0 个答案:

没有答案