32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
(function(context,$) {
|
|
|
|
"use strict";
|
|
|
|
context.JK = context.JK || {};
|
|
context.JK.FakeJamClient = function(app) {
|
|
var logger = context.JK.logger;
|
|
logger.info("*** Fake JamClient instance initialized. ***");
|
|
|
|
function testLatency(clientID, callbackFunctionName) {
|
|
logger.debug("Fake JamClient: testLatency called with client, " + clientID + " and callback function name: " + callbackFunctionName);
|
|
var response = {
|
|
clientID: clientID,
|
|
latency: 50
|
|
};
|
|
var js = callbackFunctionName + "(" + JSON.stringify(response) + ");";
|
|
eval(js);
|
|
}
|
|
|
|
function joinSession(sessionId) {}
|
|
function participantLeft(session, participant) {}
|
|
function participantJoined(session, participant) {}
|
|
|
|
// Javascript Bridge seems to camel-case
|
|
this.TestLatency = testLatency;
|
|
this.JoinSession = joinSession;
|
|
this.ParticipantLeft = participantLeft;
|
|
this.ParticipantJoined = participantJoined;
|
|
|
|
};
|
|
|
|
})(window,jQuery); |