Upgrade twilio-video to 1.0.0 and remove TEST_CONFIGURATION_SID

This commit is contained in:
Hector Ortega
2017-05-18 14:24:05 -05:00
parent efe6ff90e8
commit 425a5e85e3
3 changed files with 15 additions and 27 deletions

View File

@@ -3,7 +3,6 @@ $(function() {
configureField(response, 'TWILIO_ACCOUNT_SID','twilioAccountSID',false);
configureField(response, 'TWILIO_API_KEY','twilioAPIKey',false);
configureField(response, 'TWILIO_API_SECRET','twilioAPISecret',true);
configureField(response, 'TWILIO_CONFIGURATION_SID','twilioConfigurationSID',false);
configureField(response, 'TWILIO_NOTIFICATION_SERVICE_SID','twilioNotificationServiceSID',false);
configureField(response, 'TWILIO_CHAT_SERVICE_SID','twilioChatServiceSID',false);
configureField(response, 'TWILIO_SYNC_SERVICE_SID','twilioSyncServiceSID',false);
@@ -12,39 +11,33 @@ $(function() {
if (response.TWILIO_ACCOUNT_SID && response.TWILIO_ACCOUNT_SID != '' &&
response.TWILIO_API_KEY && response.TWILIO_API_KEY != '' && response.TWILIO_API_SECRET) {
if (response.TWILIO_CONFIGURATION_SID && response.TWILIO_CONFIGURATION_SID != '') {
$('#videoDemoButton').addClass('btn-success');
} else {
$('#videoDemoButton').addClass('btn-danger');
}
if (response.TWILIO_CHAT_SERVICE_SID && response.TWILIO_CHAT_SERVICE_SID != '') {
$('#chatDemoButton').addClass('btn-success');
} else {
$('#chatDemoButton').addClass('btn-danger');
$('#chatDemoButton').addClass('btn-danger');
}
if (response.TWILIO_SYNC_SERVICE_SID && response.TWILIO_SYNC_SERVICE_SID != '') {
$('#syncDemoButton').addClass('btn-success');
} else {
$('#syncDemoButton').addClass('btn-danger');
$('#syncDemoButton').addClass('btn-danger');
}
if (response.TWILIO_NOTIFICATION_SERVICE_SID && response.TWILIO_NOTIFICATION_SERVICE_SID != '') {
$('#notifyDemoButton').addClass('btn-success');
} else {
$('#notifyDemoButton').addClass('btn-danger');
$('#notifyDemoButton').addClass('btn-danger');
}
}
else {
$('#videoDemoButton').addClass('btn-danger');
$('#chatDemoButton').addClass('btn-danger');
$('#syncDemoButton').addClass('btn-danger');
$('#notifyDemoButton').addClass('btn-danger');
$('#notifyDemoButton').addClass('btn-danger');
}
});
var configureField = function(response, keyName,elementId,masked) {
@@ -67,4 +60,4 @@ $(function() {
}
};
});
});

View File

@@ -4,7 +4,7 @@
<title>Twilio Server Starter Kit</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="index.css">
</head>
@@ -28,30 +28,25 @@
</table>
<h2>Products</h2>
<table class="table table-striped">
<tr>
<td class="config-product">Video</td>
<td class="config-key">TWILIO_CONFIGURATION_SID</td>
<td class="config-value" id="twilioConfigurationSID"></td>
</tr>
<tr>
<td class="config-product">Notify</td>
<td class="config-key">TWILIO_NOTIFICATION_SERVICE_SID</td>
<td class="config-value" id="twilioNotificationServiceSID"></td>
</tr>
</tr>
<tr>
<td class="config-product">Chat</td>
<td class="config-key">TWILIO_CHAT_SERVICE_SID</td>
<td class="config-value" id="twilioChatServiceSID"></td>
</tr>
</tr>
<tr>
<td class="config-product">Sync</td>
<td class="config-key">TWILIO_SYNC_SERVICE_SID</td>
<td class="config-value" id="twilioSyncServiceSID"></td>
</tr>
</tr>
</table>
<h1>Demos</h1>
<a id="videoDemoButton" class="btn btn-lg" href="/video/">Video</a>
<a id="videoDemoButton" class="btn btn-lg btn-success" href="/video/">Video</a>
<a id="syncDemoButton" class="btn btn-lg" href="/sync/">Sync</a>
<a id="notifyDemoButton" class="btn btn-lg" href="/notify/">Notify</a>
<a id="chatDemoButton" class="btn btn-lg" href="/chat/">Chat</a>
@@ -61,4 +56,4 @@
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="/config-check.js"></script>
</body>
</script>
</script>

View File

@@ -22,7 +22,7 @@
</div>
<script src="//media.twiliocdn.com/sdk/js/common/v0.1/twilio-common.min.js"></script>
<script src="//media.twiliocdn.com/sdk/js/video/releases/1.0.0-beta5/twilio-video.js"></script>
<script src="//media.twiliocdn.com/sdk/js/video/releases/1.0.0/twilio-video.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="quickstart.js"></script>
</body>