toolkit
A toolkit containing functions that help with standard smartersockets tasks
##Getting Started
npm install @smarterservices/vps-proctor-socket-toolkit
###Constructor:
var toolkit = require('@smarterservices/vps-proctor-socket-toolkit');
var kit = new toolkit({socket:socket}};
Note socket in config is where you pass your entire smarterservices socket
##Methods
###changeState
description: Used to publish to a listener telling them to change state.
Arguments
topic
: topic of the listenerstate
: The state to change to.
exam-view
conversation-view
Example
kit.changeState(topic,state);
###examStatus
Invoked when you need to actually change the status of the exam.
Arguments
topic
: topic of the listenerstatus
: The status to change the exam to.
Example
kit.examStatus(topic,status);
###pasteText
When invoked will send paste: true with type pastText
Arguments
topic
: topic of the listener
Example
kit.pasteText(topic);
###blockExam
When invoked will send boolean to pause or unpause student proctor session
Arguments
topic
: topic of the listenerblockExam
: boolean to pause exam or not.
Example
kit.blockExam(topic,blockExam);
###fullScreen
Invoked to shift student applicaiton to fullscreen or not
Arguments
topic
: topic of the listenerfull
: boolean to make fullscreen or no
Example
kit.fullScreen(topic,full);
###s3Speed
description: Send video upload metadata over socket
Arguments
topic
: topic of the listeneruserId
: the users idsessionId
: the session id for that videovideoType
: the video type. I.e webcam,screenvideoTimestamp
: the timestamp from the videovideoId
: the video idspeed
: the speed of the uploadsize
: the size of the uploadtime
: the time the upload took
Example
kit.s3Speed(topic,userId,sessionId,videoType,videoTimestamp,videoId,speed,size,time);