Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • VideoPlayer

Index

Constructors

constructor

  • new VideoPlayer(keyOrUrl: string, bounds?: Rectangle): VideoPlayer
  • Parameters

    • keyOrUrl: string

      the key identifier of the video (previously added to SZ.VideoManager) or the url path to video file (including filename)

    • Optional bounds: Rectangle

      the playback bounds of the video. The default/undefined will use the bounds of the phaser div

    Returns VideoPlayer

Properties

forceDisableAutoplay

forceDisableAutoplay: boolean = false

Force disabling autoplay to make the play button / click authorization show when play() is called. This is mainly set when testing.

phaserWrapperId

phaserWrapperId: string = "phaser-content"

The id of the html container holding phaser

playButtonId

playButtonId: string = "sz-phaser-video-play-button"

The id of the play html button (if it needs to display because of autoplay)

showPlaybackControls

showPlaybackControls: boolean = false

Show the html video playback controls

stopOnClick

stopOnClick: boolean = false

Enable/disable a playing video to be stopped when it is clicked on

videoId

videoId: string = "sz-video-player"

The id of the video html element

Accessors

onStop

  • get onStop(): Signal
  • Event listener signalled when the video stops

    Returns Signal

Methods

destroy

  • destroy(): void
  • Destroy video resources (and stop if playing)

    Returns void

onStartPlaying

  • onStartPlaying(): void
  • Returns void

pause

  • pause(): void
  • Pause video

    Returns void

play

  • play(): void
  • Start playing video

    Returns void

resume

  • resume(): void
  • Resume video

    Returns void

stop

  • stop(): void
  • Stop video

    Returns void