API Docs for: 2.0.0

Class movie_player

Class defined in: public/src/movie_player.js:18

Movie player application, inherits from SAGE2_BlockStreamingApp

contextToggleMute( responseObject )
public/src/movie_player.js:432

Calls togglePlayPause passing the given time.

Parameters:
  • responseObject <Object>

    contains response from entry selection

contextTogglePlayPause( responseObject )
public/src/movie_player.js:421

Calls togglePlayPause passing the given time.

Parameters:
  • responseObject <Object>

    contains response from entry selection

contextVideoSyncHandler( responseObject )
public/src/movie_player.js:443

Sets variables necessary sending or receiving of commands. A player can send or receive, but not both.

Parameters:
  • responseObject <Object>

    contains response from entry selection

contextVideoSyncStep( responseObject )
public/src/movie_player.js:483

Initiates a step and pauses.

Parameters:
  • responseObject <Object>

    contains response from entry selection

event( eventType, position, user_id, data, date )
public/src/movie_player.js:584

Handles event processing, arrow keys to navigate, and r to redraw

Parameters:
  • eventType <String>

    the type of event

  • position <Object>

    contains the x and y positions of the event

  • user_id <Object>

    data about the user who triggered the event

  • data <Object>

    object containing extra data about the event,

  • date <Date>

    current time from the server

init( data )
public/src/movie_player.js:25

Init method, creates an 'div' tag in the DOM

Parameters:
  • data <Object>

    contains initialization values (id, width, height, ...)

initWidgets( )
public/src/movie_player.js:45

Builds the widgets to control the movie player

load( date )
public/src/movie_player.js:135

Load the app from a previous state and builds the widgets

Parameters:
  • date <Date>

    time from the server

postDraw( date )
public/src/movie_player.js:144

Overloading the postDraw call to update the title

Parameters:
  • date <Date>

    current time from the server

setVideoFrame( frameIdx )
public/src/movie_player.js:101

Set to movie player to a given frame

Parameters:
  • frameIdx <Number>

    change the current frame number

toggleLoop( )
public/src/movie_player.js:249

Toggle between looping and not looping

toggleMute( )
public/src/movie_player.js:228

Toggle between mute and unmute

togglePlayPause( )
public/src/movie_player.js:171

Toggle between play and pause

videoEnded( )
public/src/movie_player.js:112

Pause the movie if not in loop mode

videoSyncCommandHandler( valueUpdate )
public/src/movie_player.js:541

Assumes that the update value is an object with properties: command timestamp frame framerate

Parameters:
  • valueUpdate <Object>

    contains last sent command