API Docs for: 2.0.0

Class media_stream

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

Class for media streaming applications, no block streaming

draw( date )
public/src/media_stream.js:118

Draw function

Parameters:
  • date <Date>

    current time from the server

event( eventType, position, user_id, data, date )
public/src/media_stream.js:141

Handles event processing for the app

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/media_stream.js:25

Init method, creates a 'img' tag in the DOM

Parameters:
  • data <Object>

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

load( state, date )
public/src/media_stream.js:65

Loads the app from a previous state

Parameters:
  • state <Object>

    object to initialize or restore the app

  • date <Date>

    time from the server

resize( date )
public/src/media_stream.js:132

After resize

Parameters:
  • date <Date>

    current time from the server