Options
All
  • Public
  • Public/Protected
  • All
Menu

Fullscreen element.

description

Following the Fullscreen API, this class toggles media dimensions to present video using the user's entire screen, even when the player is playing Ads.

see

https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API

see

https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/cross_browser_video_player#Fullscreen

class

Fullscreen

implements

PlayerComponent

Hierarchy

  • Fullscreen

Implements

Index

Constructors

constructor

Properties

Private button

button: HTMLButtonElement

Button to toggle fullscreen effect.

type

HTMLButtonElement

memberof

Fullscreen

Private clickEvent

clickEvent: function

Callback when user clicks Fullscreen button.

memberof

Fullscreen

Type declaration

    • (): void
    • Returns void

fullScreenEnabled

fullScreenEnabled: boolean

Flag to determine if fullscreen is available natively.

type

boolean

memberof

Fullscreen

Private fullscreenEvents

fullscreenEvents: string[]

List of events when fullscreen change is fired.

type

string[]

memberof

Fullscreen

Private fullscreenHeight

fullscreenHeight: number

Storage for user's full screen height.

type

number

memberof

Fullscreen

Private fullscreenWidth

fullscreenWidth: number

Storage for user's full screen width.

type

number

memberof

Fullscreen

Private isFullscreen

isFullscreen: boolean

Flag to determine if media is currently being played in fullscreen mode.

type

boolean

memberof

Fullscreen

Private player

player: Player

Instance of OpenPlayer.

type

Player

memberof

Fullscreen

Methods

Private _fullscreenChange

  • _fullscreenChange(): void
  • Callback to toggle fullscreen for browsers thta do not support native Fullscreen API.

    memberof

    Fullscreen

    Returns void

Private _resize

  • _resize(width?: number, height?: number): void
  • Set dimensions for the video tag and player's container.

    memberof

    Fullscreen

    Parameters

    • Optional width: number

      The width of the media

    • Optional height: number

      The height of the media

    Returns void

Private _setFullscreenData

  • _setFullscreenData(state: boolean): void
  • Update the data-fullscreen of the player's container and toggle button's class depending if player is on fullscreen mode or not.

    memberof

    Fullscreen

    Parameters

    • state: boolean

      Whether media is fullscreen or not

    Returns void

create

  • create(): void

destroy

  • destroy(): void
  • Remove HTML associated to specific OpenPlayer's element.

    This method must include the removal of its previously set events.

    memberof

    PlayerComponent

    Returns void

toggleFullscreen

  • toggleFullscreen(): void
  • Enter/cancel fullscreen depending of browser's capabilities.

    If browser does not support native Fullscreen API, player will adjust the video and its parent container's dimensions via width and height styles.

    memberof

    Fullscreen

    Returns void

Generated using TypeDoc