API Docs for: 2.0.0

Class SAGE2_interaction

Class defined in: public/src/SAGE2_interaction.js:149

Deals with pointer, file upload, desktop sharing, ...

allowAction( )
public/src/SAGE2_interaction.js:97

Handles server notification that action was permitted

cancelAction( )
public/src/SAGE2_interaction.js:111

Handles server notification that action was canceled due to permissions

cancelUploads( )
public/src/SAGE2_interaction.js:235

Cancel the file uploads by aborting the XMLHttpRequests

captureDesktop( data )
public/src/SAGE2_interaction.js:568

Initialize the screen share request, for Chrome or Firefox

Parameters:
captureMediaFrame( )
public/src/SAGE2_interaction.js:731

Received a new frame, capture it and return a JPEG buffer

changeSage2PointerColorMethod( value )
public/src/SAGE2_interaction.js:1000

Handler for the pointer color selection

Parameters:
changeSage2PointerLabelMethod( value )
public/src/SAGE2_interaction.js:973

Handler for pointer lable text

Parameters:
changeScreenShareQualityMethod( value )
public/src/SAGE2_interaction.js:1036

Handler for screen quality selection

Parameters:
  • value <Number>

    a value corresponding to a quality level

changeScreenShareResolutionMethod( value, resolution )
public/src/SAGE2_interaction.js:1018

Handler for screen resolution selection

Parameters:
  • value <Number>

    a value corresponding to a resolution level

  • resolution <String>

    resolution in the format "width x height"

handleLoginStateChange( response )
public/src/SAGE2_interaction.js:34

Callback any time a login event is attempted

Parameters:
  • response <Object>

    data returned by the server

loginDialog( callingView )
public/src/SAGE2_interaction.js:1046

Webix modal for user login

Parameters:
  • callingView <Object>

    webix view that called this method

pointerDblClickMethod( event )
public/src/SAGE2_interaction.js:855

Handler for double click

Parameters:
  • event <Event>

    double click event

pointerKeyDownMethod( event )
public/src/SAGE2_interaction.js:892

Handler for key down

Parameters:
pointerKeyPressMethod( event )
public/src/SAGE2_interaction.js:938

Handler for key press

Parameters:
pointerKeyUpMethod( event )
public/src/SAGE2_interaction.js:922

Handler for key up

Parameters:
pointerLockChangeMethod( event )
public/src/SAGE2_interaction.js:452

Called when a pointer lock change is triggered, release or aquire

Parameters:
pointerLockErrorMethod( event )
public/src/SAGE2_interaction.js:442

Called if pointer lock failed

Parameters:
  • event <Event>

    error event

pointerMoveMethod( event )
public/src/SAGE2_interaction.js:801

Handler for mouse move

Parameters:
  • event <Event>

    move event

pointerPressMethod( event )
public/src/SAGE2_interaction.js:787

Handler for mouse press

Parameters:
  • event <Event>

    press event

pointerReleaseMethod( event )
public/src/SAGE2_interaction.js:841

Handler for mouse release

Parameters:
  • event <Event>

    release event

pointerScrollMethod( event )
public/src/SAGE2_interaction.js:868

Handler for mouse scroll

Parameters:
String randomHexColor( )
public/src/SAGE2_interaction.js:136

Returns: <String>

color as a hex string

sendMediaStreamFrame( )
public/src/SAGE2_interaction.js:752

Send the captured frame to the server

sendPlay( )
public/src/SAGE2_interaction.js:963

Send a spacebar key, for playing PDF and movies mostly

setFileUploadCompleteCallback( callback )
public/src/SAGE2_interaction.js:225

Set the complete callback

Parameters:
  • callback <Function>

    upload complete callback

setFileUploadProgressCallback( callback )
public/src/SAGE2_interaction.js:215

Set the progress callback

Parameters:
  • callback <Function>

    upload progress callback

setFileUploadStartCallback( callback )
public/src/SAGE2_interaction.js:205

Set the start callback

Parameters:
  • callback <Function>

    upload start callback

setInteractionId( id )
public/src/SAGE2_interaction.js:185

Set a unique ID

Parameters:
setPointerSensitivity( value )
public/src/SAGE2_interaction.js:195

Set the pointer scaling factor

Parameters:
  • value <Number>

    scaling factor for pointer motion

settingsDialog( type )
public/src/SAGE2_interaction.js:1204

Webix modal for user settings

Parameters:
  • type <String>

    (init | main) indicates how to populate the dialog

startSAGE2Pointer( buttonId )
public/src/SAGE2_interaction.js:394

Request a pointer lock or assume that's a touch device

Parameters:
  • buttonId <String>

    name of the button triggering the pointer

startScreenShare( )
public/src/SAGE2_interaction.js:504

Start screen sharing, for Chrome or Firefox

stepMethod( deadline )
public/src/SAGE2_interaction.js:648

Using requestIdleCallback from Chrome for screen capture

Parameters:
  • deadline <Object>

    object containing timing information

stopSAGE2Pointer( )
public/src/SAGE2_interaction.js:424

Release the pointer

streamCanPlayMethod( event )
public/src/SAGE2_interaction.js:666

The screen sharing can start

Parameters:
streamEndedMethod( event )
public/src/SAGE2_interaction.js:635

Screen sharing has ended

Parameters:
streamFailMethod( event )
public/src/SAGE2_interaction.js:614

Screen sharing failed

Parameters:
streamSuccessMethod( stream )
public/src/SAGE2_interaction.js:591

Screen sharing is a go

Parameters:
  • stream <Object>

    media stream

togglePointerMode( )
public/src/SAGE2_interaction.js:952

Simalute Shift-Tab with keys

uploadFiles( files, dropX, dropY )
public/src/SAGE2_interaction.js:249

Form processing function

Parameters:
  • files <Object>

    array of files dropped

  • dropX <Number>

    drop location X

  • dropY <Number>

    drop location Y

uploadURL( url, dropX, dropY )
public/src/SAGE2_interaction.js:338

Process a URL drag and drop

Parameters:
  • url <String>

    URL dropped on the UI

  • dropX <Number>

    drop location X

  • dropY <Number>

    drop location Y

email <Unknown>
public/src/SAGE2_interaction.js:1387

Getter for user email

pointerColor <Unknown>
public/src/SAGE2_interaction.js:1399

Getter for pointer color

pointerLabel <Unknown>
public/src/SAGE2_interaction.js:1410

Getter for pointer label

user <Unknown>
public/src/SAGE2_interaction.js:1359

Getter for user settings

username <Unknown>
public/src/SAGE2_interaction.js:1376

Getter for user name