Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Fullscreen

A simple helper to manage fullscreen mode. Fullscreen mode requires a user gesture. request() MUST be called within screen.onClick(), sprite.onClick() or similar method

Hierarchy

  • Fullscreen

Index

Properties

Static Private exitFullscreen

exitFullscreen: any = document.exitFullscreen|| (<any>document).mozRequestFullScreen|| (<any>document).webkitRequestFullScreen|| (<any>document).msRequestFullscreen

Static Private requestFullscreen

requestFullscreen: any = document.documentElement.requestFullscreen|| (<any>document.documentElement).mozRequestFullScreen|| (<any>document.documentElement).webkitRequestFullScreen|| (<any>document.documentElement).msRequestFullscreen

Methods

Static exit

  • exit(): boolean

Static isActive

  • isActive(): boolean
  • Checks if screen is in fullscreen mode

    Returns boolean

    true if fullscreen is active

Static request

  • request(): boolean
  • Requests fullscreen mode

    Returns boolean

    true if the request is made

Static toggle

  • toggle(): boolean
  • Toggles fullscreen state

    Returns boolean

    state of fullscreen mode after call (equivalent to isActive)

Generated using TypeDoc