Initially include on your site:
<script src="tcc.js"></script>
And build a TCC object
<script type="text/javascript">
$( document ).ready(function() {
TCC.config(
param1: value,
param2: value,
...
);
});
</script>
Description: Starts the process of collaboration
TCC.start();
Description: Stops the collaborative process
TCC.stop();
Description: Perform a function before the collaboration process begins
Value type: function
TCC.config({
beforeStart: function() {
alert('Process will start');
}
});
Description: Perform a function after the collaboration process begins
Value type: function
TCC.config({
afterStart: function() {
alert('Process began');
}
});
Description: Perform a function before the collaborative process be stopped
Value type: function
TCC.config({
beforeStop: function() {
alert('Process will be stopped');
}
});
Description: Perform a function after the collaborative process be stopped
Value type: function
TCC.config({
afterStop: function() {
alert('Process stopped');
}
});
Description: Set in the days / hours the collaboration process can be started
Value type: string
Input example:
TCC.config({
//here we defined when the colaboration process will start
//Mon: all Mon days
//Thu(8-15): all Thu days, only in interval from 8 A.M. to 15 P.M.
//Sat: all Sat days, only in 8 A.M.
//Sun(22-5): all Sun days, only in interval from 22 P.M. to 23:59 P.M. and 00:01 A.M. to 5 P.M.
startIfTime: 'Mon, Thu(8-15), Sat(8-8), Sun(22-5)'
});
Description: Set a period of time to wait before starting the process of collaboration
Value type: string
or numeric
Input example:
TCC.config({
//you can set any formats, here we use the number 2 for example:
//'2m': whaiting 2 minutes
//'2s': whaiting 2 seconds
//'2': whaiting 2 miliseconds
//2: whaiting 2 miliseconds
timeToStart: '2m'
});
Description: Set in which devices the middleware should not be played
Value type: string
Possible values: desktop
, app
, tablet
, smartphone
, feature phone
, smart-tv
, robot
, other non-mobile
and other mobile
Input example:
TCC.config({
notRunDevices: 'tablet, robot, smartphone',
});
Description: It starts when the mouse cursor does not show movement on the accessed page
Value type: string
ou numeric
Input example:
TCC.config({
//you can set any formats, here we use the number 2 for example:
//'2m': starts after 2 minutes of no mouse
//'2s': starts after 2 seconds of no mouse
//'2': starts after 2 miliseconds of no mouse
//2: starts after 2 miliseconds of no mouse
startAsMouseIsStationary: '2m',
});
Description: It starts when the user is not on the active tab page (is minimized or viewed another browser tab)
Value type: boolean
Input example:
TCC.config({
loseFocus: true,
});
Description: Sets the middleware will start automatically after the page loading
Value type: boolean
Input example:
TCC.config({
autoStart: true,
});
Description: Perform a function after not find any job to be processed
Value type: function
TCC.config({
runAfterNothingToDoMessage: function() {
alert('Nothing to do');
}
});
Description: Perform a function after you have processed a task
Value type: function
TCC.config({
runAfterTaskDone: function(job_key) {
alert('Task: ' + job_key + ' is done!');
}
});
Description: Set a period of time that must wait after X process tasks for the volunteer process to continue
Value type: array[numeric, numeric/string]
Input example:
TCC.config({
//you can set any formats for time, here we use the number 2 for example:
//'2m': whaiting 2 minutes
//'2s': whaiting 2 seconds
//'2': whaiting 2 miliseconds
//2: whaiting 2 miliseconds
//defines a time interval of 2 minutes to each six processed jobs
waitAfterProcessingTasks: [6, '2m']
});
Description: Set up will be shown to the user a TCC project Manipulation Interface
Value type: boolean
Input example:
TCC.config({
allowUserInterface: true
});