Add GetASIOAudioDevices to testBridge page. Update other nav headers.
This commit is contained in:
parent
449de26da0
commit
ba0111be60
|
|
@ -17,12 +17,29 @@
|
|||
eval(js);
|
||||
}
|
||||
|
||||
function GetASIODevices(callbackFunctionName) {
|
||||
var response = {'todo':'fill me in'};
|
||||
var js = callbackFunctionName + "(" + JSON.stringify(response) + ");";
|
||||
eval(js);
|
||||
}
|
||||
|
||||
function TestAudioDevice(deviceId, callbackFunctionName) {
|
||||
var response = {
|
||||
deviceId: deviceId,
|
||||
deviceLatencyMS: 5.3
|
||||
};
|
||||
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.GetASIODevices = GetASIODevices;
|
||||
this.TestAudioDevice = TestAudioDevice;
|
||||
this.JoinSession = joinSession;
|
||||
this.ParticipantLeft = participantLeft;
|
||||
this.ParticipantJoined = participantJoined;
|
||||
|
|
|
|||
|
|
@ -71,8 +71,6 @@
|
|||
}
|
||||
|
||||
function loggedIn(header, payload) {
|
||||
logger.debug('loggedIn');
|
||||
logger.debug(payload);
|
||||
app.clientId = payload.client_id;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,12 +12,11 @@
|
|||
sessionId: '#testBridge-createdSessionId',
|
||||
jSession: '#testBridge-joinSession',
|
||||
testLatency: '#testBridge-TestLatency',
|
||||
testLatencyResponse: '#testBridge-TestLatencyResponse'
|
||||
testLatencyResponse: '#testBridge-TestLatencyResponse',
|
||||
getDevices: '#testBridge-GetDevices'
|
||||
};
|
||||
|
||||
function afterShow(data) {
|
||||
app.subscribe(context.JK.MessageType.LOGIN_ACK, loggedIn);
|
||||
}
|
||||
function afterShow(data) {}
|
||||
|
||||
function loggedIn(header, payload) {
|
||||
var clientId = payload.client_id;
|
||||
|
|
@ -88,22 +87,36 @@
|
|||
$(selectors.testLatencyResponse).html(latency);
|
||||
}
|
||||
|
||||
function getDevicesHandler(evt) {
|
||||
var jsFunction = "JK.GetASIODevicesResponse";
|
||||
logger.debug("About to try and call jamClient.GetASIODevices. Here's full jamClient:");
|
||||
logger.debug(context.jamClient);
|
||||
context.jamClient.GetASIODevices(jsFunction);
|
||||
}
|
||||
|
||||
function GetASIODevicesResponse(response) {
|
||||
$(selectors.getDevices + ' textarea').val(JSON.stringify(response));
|
||||
}
|
||||
|
||||
function events() {
|
||||
$(selectors.cSession + ' input[type="button"]').click(createSessionHandler);
|
||||
$(selectors.jSession + ' input[type="button"]').click(joinSessionHandler);
|
||||
$(selectors.testLatency + ' input[type="button"]').click(testLatencyHandler);
|
||||
$(selectors.getDevices + ' input[type="button"]').click(getDevicesHandler);
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
var screenBindings = { 'afterShow': afterShow };
|
||||
app.bindScreen('testBridge', screenBindings);
|
||||
events();
|
||||
app.subscribe(context.JK.MessageType.LOGIN_ACK, loggedIn);
|
||||
}
|
||||
|
||||
// Public
|
||||
this.initialize = initialize;
|
||||
|
||||
context.JK.TestBridgeLatencyResponse = latencyResponse;
|
||||
context.JK.GetASIODevicesResponse = GetASIODevicesResponse;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<!-- Create Session Screen -->
|
||||
<div layout="screen" layout-id="createSession" class="screen secondary">
|
||||
<div class="breadcrumb">
|
||||
<p layout-link="home">Home > </p>
|
||||
<p class="current">Create Session</p>
|
||||
<div class="content-head">
|
||||
<h1>Create Session</h1>
|
||||
<%= render "screen_navigation" %>
|
||||
</div>
|
||||
<form id="create-session-form">
|
||||
<div class="body">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
<!-- Find Session Screen -->
|
||||
<div layout="screen" layout-id="findSession" class="screen secondary">
|
||||
<h1>Find a Session</h1>
|
||||
<p layout-link="home">Home</p>
|
||||
<div class="content-head">
|
||||
<h1>Find a Session</h1>
|
||||
<%= render "screen_navigation" %>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Genre</th>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
<!-- Test Page for Javascript Bridge -->
|
||||
<div layout="screen" layout-id="testBridge" class="screen secondary">
|
||||
<h1>Javascript Bridge Test</h1>
|
||||
<p layout-link="home">Home</p>
|
||||
<div id="testBridge-clientid"></div>
|
||||
<div class="content-head">
|
||||
<h1>Javascript Bridge Test</h1>
|
||||
<%= render "screen_navigation" %>
|
||||
</div>
|
||||
<div id="testBridge-clientid">I don't think I'm connected!</div>
|
||||
<hr/>
|
||||
|
||||
<div id="testBridge-createSession" style="border: 1px solid #fff; margin: 1em; float:left;">
|
||||
<h2>Create hard-coded session</h2>
|
||||
<label>Prefix (1, 2, 3, etc.)
|
||||
|
|
@ -12,6 +15,7 @@
|
|||
</label>
|
||||
<div><label>Session Id: <span id="testBridge-createdSessionId" style="display:inline-block; margin:4px;"></span></label></div>
|
||||
</div>
|
||||
|
||||
<div id="testBridge-joinSession" style="border: 1px solid #fff; margin: 1em; float:left;">
|
||||
<h2>Join sesssion</h2>
|
||||
<label>Session ID
|
||||
|
|
@ -19,6 +23,7 @@
|
|||
<input type="button" value="Join!"/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="testBridge-TestLatency" style="clear:both;">
|
||||
<h2>TestLatency</h2>
|
||||
<label>Client ID (to ping)
|
||||
|
|
@ -27,6 +32,13 @@
|
|||
<div><label>Response: <span id="testBridge-TestLatencyResponse" style="display:inline-block; margin:4px;"></span></label></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
<div id="testBridge-GetDevices">
|
||||
<h2>GetASIODevices</h2>
|
||||
<input type="button" value="Invoke"/>
|
||||
<textarea></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/template" id="template-testBridge-clientid">
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@
|
|||
var jk = JK.JamKazam();
|
||||
jk.initialize();
|
||||
|
||||
var jam_server = JK.JamServer;
|
||||
jam_server.connect();
|
||||
|
||||
var header = new JK.Header(jk);
|
||||
header.initialize();
|
||||
|
||||
|
|
@ -68,8 +71,6 @@
|
|||
var testBridgeScreen = new JK.TestBridgeScreen(jk);
|
||||
testBridgeScreen.initialize();
|
||||
|
||||
var jam_server = JK.JamServer;
|
||||
jam_server.connect();
|
||||
|
||||
} else {
|
||||
var landing = new JK.LandingPage(jk);
|
||||
|
|
|
|||
Loading…
Reference in New Issue