How to use the screenfull.enabled function in screenfull

To help you get started, we’ve selected a few screenfull examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github goblin-laboratory / reactjs-player / src / lib / index.js View on Github external
exitFullscreen = () => {
    if (screenfull.enabled) {
      screenfull.exit();
    }
  };
github digirati-co-uk / canvas-panel / packages / canvas-panel-core / src / components / Fullscreen / Fullscreen.js View on Github external
render() {
    const { children, ...props } = this.props;
    const { isFullscreen } = this.state;

    return functionOrMapChildren(children, {
      fullscreenEnabled: screenfull.enabled,
      isFullscreen,
      toggleFullscreen: this.toggleFullscreen,
      goFullscreen: this.goFullscreen,
      exitFullscreen: this.exitFullscreen,
      ref: this.setRef,
      ...props,
    });
  }
}
github dasilvacontin / ludumpad / packages / ludumpad-client / src / app.js View on Github external
onFocusTimeout = setTimeout(function () {
      if (socket.disconnected) socket = io()
      if (screenfull.enabled) screenfull.request()
    }, 0)
  }
github Wikia / app / extensions / wikia / ArticleVideo / bower_components / html5-skin / js / controller.js View on Github external
enableFullScreen: function() {
      if (Fullscreen.enabled) {
        this.state.isFullScreenSupported = true;
        document.addEventListener(Fullscreen.raw.fullscreenchange, this.onFullscreenChanged.bind(this));
      }
    },
github ElderJames / aspnetcore-material-universal / ClientApp / src / app / admin / header / header.component.ts View on Github external
toggleFullscreen() {
    if (screenfull.enabled) {
      screenfull.toggle();
      this.isFullscreen = !this.isFullscreen;
    }
  }
github greglobinski / gatsby-starter-personal-blog / src / components / ActionsBar / ActionsBar.js View on Github external
)}
          
            
          
        
        <div>
          {navigatorPosition === "is-aside" &amp;&amp; }
          {screenfull.enabled &amp;&amp; (
            
              {this.state.fullscreen ?  : }
            
          )}
          
            
          
        </div>
      
    );
  }
github linlinjava / litemall / litemall-admin / src / components / Screenfull / index.vue View on Github external
click() {
      if (!screenfull.enabled) {
        this.$message({
          message: '浏览器不支持全屏',
          type: 'warning'
        })
        return false
      }
      screenfull.toggle()
    }
  }