提交 f95acb5a authored 作者: Anthony Minessale's avatar Anthony Minessale

check in raw verto js files and directory structure for development

上级 011e0696
This needs to be fleshed out more.
It would be nice to develop a web app here that implements a web phone.
Do not base it on the demo because it was just tossed together.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
.nthChildTest > div:nth-child(odd) {
display: none;
}
.jsDataTable > thead > tr > th {
border-width:4px;
padding: 2px;
font-size:10pt;
text-align: left;
}
.jsDataTable > thead > tr > th.notSortable {
padding: 5px;
}
.jsDataTable > tbody > tr > td {
border-bottom: 1px solid #ccc;
padding: 2px;
vertical-align: middle;
}
.jsDataTable {
font-family: verdana;
font-size:10pt;
}
.jsDataTable > tbody > tr:nth-child(odd),
.jsDataTable > tbody > tr.odd {
background-color: #ffffee;
}
.jsDataTable > tbody > tr:nth-child(even),
.jsDataTable > tbody > tr.even {
background-color: #ffffff;
}
.jsDataTable > thead th.sortAsc,
.jsDataTable > thead th.sortDesc {
color:ffffff;
background-color: #7777ff;
background-position: right center;
background-repeat: no-repeat;
}
.jsDataTable > thead th.sortAsc {
background-image: url(/images/table/asc.png);
}
.jsDataTable > thead th.sortDesc {
background-image: url(/images/table/desc.png);
}
.jsDataTable.clickable > tbody > tr,
.clickable > .jsDataTable > tbody > tr {
cursor: pointer;
}
.jsDataTable.clickable > tbody > tr.nonDataRow,
.clickable > .jsDataTable > tbody > tr.nonDataRow {
cursor: auto;
}
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
<script>
document.location = "https://" + window.location.hostname + "/verto/verto.html";
</script>
This diff was suppressed by a .gitattributes entry.
/*!
* jQuery Cookie Plugin v1.3.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2013 Klaus Hartl
* Released under the MIT license
*/
(function ($, document, undefined) {
var pluses = /\+/g;
function raw(s) {
return s;
}
function decoded(s) {
return unRfc2068(decodeURIComponent(s.replace(pluses, ' ')));
}
function unRfc2068(value) {
if (value.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape
value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
return value;
}
function fromJSON(value) {
return config.json ? JSON.parse(value) : value;
}
var config = $.cookie = function (key, value, options) {
// write
if (value !== undefined) {
options = $.extend({}, config.defaults, options);
if (value === null) {
options.expires = -1;
}
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
value = config.json ? JSON.stringify(value) : String(value);
return (document.cookie = [
encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// read
var decode = config.raw ? raw : decoded;
var cookies = document.cookie.split('; ');
var result = key ? null : {};
for (var i = 0, l = cookies.length; i < l; i++) {
var parts = cookies[i].split('=');
var name = decode(parts.shift());
var cookie = decode(parts.join('='));
if (key && key === name) {
result = fromJSON(cookie);
break;
}
if (!key) {
result[name] = fromJSON(cookie);
}
}
return result;
};
config.defaults = {};
$.removeCookie = function (key, options) {
if ($.cookie(key) !== null) {
$.cookie(key, null, options);
return true;
}
return false;
};
})(jQuery, document);
差异被折叠。
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/jquery.mobile-1.3.2.min.css" />
<link rel="stylesheet" type="text/css" href="css/jsontable.css" />
<link rel="shortcut icon" href="favicon.ico" />
<meta charset="utf-8" />
<title>FreeSWITCH Verto Demo</title>
<style type="text/css">
.pageheader {
font-size: 22px;
font-weight: normal;
height: 27px;
}
</style>
</head>
<body>
<div data-role="page" id="page-login" align="center">
<div data-role="header" class="page-header">
FreeSWITCH Verto Demo
</div>
<br>
<a target="_CC2104" href="https://www.cluecon.com"><img border="0" width="300" src="img/cc_banner2014.gif"></a>
<div data-role="fieldcontain">
<label for="name">Login</label>
<input type="text" size="20" id="login"/>
</div>
<div data-role="fieldcontain">
<label for="name">Password</label>
<input type="password" size="20" id="passwd"/>
</div>
<div data-role="fieldcontain">
<label for="name">CID Name</label>
<input type="text" size="30" id="name"/>
</div>
<div data-role="fieldcontain">
<label for="name">CID Number</label>
<input type="text" size="20" id="cid"/>
</div>
<div data-role="fieldcontain">
<label for="name">Hostname</label>
<input type="text" size="20" id="hostName"/>
</div>
<div data-role="fieldcontain">
<label for="name">Websocket URL</label>
<input type="text" size="20" id="wsURL"/>
</div>
<br><br>
<button data-inline="true" id="loginbtn">Log In</button>
</div>
<div data-role="page" id="page-incall" align="center">
<div data-role="header" id="calltitle" class="pageheader">
Verto IN CALL
</div>
<br>
<a target="_CC2104" href="https://www.cluecon.com"><img border="0" width="300" src="img/cc_banner2014.gif"></a>
<br><br>
<div id="conf">
<div style="color:black;font-family: verdana" align="center" id="mcount"></div>
<table cellspacing="0" cellpadding="0" border="0" align="center" id="example" class="jsDataTable">
</table>
</div>
<div id="display" style="font-weight:bold;font-size:18px"></div>
<br>
<div data-role="fieldcontain" id="xferdiv">
<input data-mini="true" type="text" id="xferto"><br>
<button data-inline="true" id="cancelxferbtn">Cancel Transfer</button>
<button data-inline="true" class="startxferbtn">Complete Transfer</button>
</div>
<div id=keypad>
<button class="dtmf" data-inline="true">1</button>
<button class="dtmf" data-inline="true">2</button>
<button class="dtmf" data-inline="true">3</button>
<br>
<button class="dtmf" data-inline="true">4</button>
<button class="dtmf" data-inline="true">5</button>
<button class="dtmf" data-inline="true">6</button>
<br>
<button class="dtmf" data-inline="true">7</button>
<button class="dtmf" data-inline="true">8</button>
<button class="dtmf" data-inline="true">9</button>
<br>
<button class="dtmf" data-inline="true">*</button>
<button class="dtmf" data-inline="true">0</button>
<button class="dtmf" data-inline="true">#</button>
</div>
<br>
<button data-inline="true" id="hold">HOLD</button>
<button data-inline="true" id="hupbtn">End Call</button>
<button data-inline="true" class="startxferbtn">Transfer</button>
<div id="media">
<video width=800 id="webcam" autoplay="autoplay" hidden="true"></video>
</div>
<br><br>
</div>
<div data-role="page" id="page-main" align="center">
<div data-role="header" class="pageheader">
FreeSWITCH Verto Demo
</div>
<br>
<a target="_CC2104" href="https://www.cluecon.com"><img border="0" width="300" src="img/cc_banner2014.gif"></a>
<div id="offline">
<h2>LOGGING IN</h2>
<img src="images/login.gif"></img>
<div id="errordisplay" style="font-weight:bold;font-size:18px;color:#ae0000"></div>
</div>
<div id="online" align="center">
<div id="text"></div>
<div data-role="fieldcontain">
<input type="text" id="ext"/><br>
<div id="dialpad">
<button class="dialbtn" data-inline="true">1</button>
<button class="dialbtn" data-inline="true">2</button>
<button class="dialbtn" data-inline="true">3</button>
<br>
<button class="dialbtn" data-inline="true">4</button>
<button class="dialbtn" data-inline="true">5</button>
<button class="dialbtn" data-inline="true">6</button>
<br>
<button class="dialbtn" data-inline="true">7</button>
<button class="dialbtn" data-inline="true">8</button>
<button class="dialbtn" data-inline="true">9</button>
<br>
<button class="dialbtn" data-inline="true">*</button>
<button class="dialbtn" data-inline="true">0</button>
<button class="dialbtn" data-inline="true">#</button>
</div>
<button data-inline="true" id="clearbtn">Clear</button>
<button data-inline="true" id="callbtn">Call</button>
<br><br>
<button data-inline="true"id="logoutbtn">Log Out</button>
</div>
<br>
<label><input id="use_vid" type="checkbox" value="foo" > Use Video</label>
<label><input id="use_stereo" type="checkbox" value="foo" > Stereo Audio</label>
<br>
<!--
<b>TEXT</b><br>To: <input type="text" size="20" id="textto"/> MSG: <input type="text" size="40" id="textmsg"/>
<button id="vtxtbtn">Send</button>
-->
</div>
<table width=500 style="font-size:11pt;font-face:arial">
<tr><td align=center colspan=2><b>FreeSWITCH VERTO WebRTC Demo Directory<Br><br></td></tr>
<tr><td width=100><b>Dial</b></td><td><b>Desc</b></td></tr>
<tr><td align=left colspan=2><hr></td></tr>
<tr><td>3d1</td><td> 3D sound demo #1</td></tr>
<tr><td>3d2</td><td> 3D sound demo #2</td></tr>
<tr><td>stereo1</td><td> Stereo sound demo #1</td></tr>
<tr><td>stereo2</td><td> Stereo sound demo #2</td></tr>
<tr><td>stereo3</td><td> Stereo sound demo #3</td></tr>
<tr><td>3500</td><td>Local 48k Stereo Conference</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>cluecon</td><td> ClueCon Hotline</td></tr>
<tr><td>&lt;number&gt;</td><td>Call a US/Canda Number</td></tr>
<tr><td>vuc</td><td>VoIP Users Conference</td></tr>
<tr><td>888</td><td>FreeSWITCH Community Conference</td></tr>
<tr><td>3300</td><td>Local 48k Conference</td></tr>
<tr><td>5000</td><td>Try the Demo IVR</td></tr>
<tr><td>9664</td><td>Listen to Hold Music</td></tr>
<tr><td>9386</td><td>Funny Prompts</td></tr>
<tr><td>9198</td><td>Tetris (tone generator)</td></tr>
<tr><td colspan=2><Br>
<center>
<br><br><br>
</td></tr>
</td></tr>
</table>
</div><!-- /page -->
<div data-role="page" id="dialog-logout" data-close-btn="none">
<div data-role="header">
<h2>Logged Out</h2>
</div>
<div data-role="content">
<p>You have been logged out or disconnected from the server.</p>
<button onclick="$('#dialog-logout').dialog('close')">OK</button>
</div>
</div>
<div data-role="page" id="dialog-login-error" data-close-btn="none">
<div data-role="header">
<h2>Login Error</h2>
</div>
<div data-role="content">
<p>Error logging in</p>
<button onclick="$('#dialog-login-error').dialog('close')">OK</button>
</div>
</div>
<div data-role="page" id="dialog-hold" data-close-btn="none">
<div data-role="header">
<h2>Call On hold</h2>
</div>
<div data-role="content">
<p>The call is on hold</p>
<button onclick="$('#dialog-hold').dialog('close');cur_call.toggleHold();">Resume Call</button>
</div>
</div>
<div data-role="page" id="dialog-incoming-call" data-close-btn="none">
<div data-role="header">
<h2>Incoming Call</h2>
</div>
<div data-role="content">
<div id="dialog-incoming-call-txt"><p>Incoming Call</p></div>
<button id="ansbtn">Answer</button>
<div id="vansdiv"><button id="vansbtn">Answer Video</button></div>
<button id="declinebtn">Decline</button>
</div>
</div>
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.json-2.4.min.js"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/verto-min.js"></script>
<script type="text/javascript" src="verto.js"></script>
</body>
</html>
差异被折叠。
JSFILES=src/jquery.FSRTC.js src/jquery.jsonrpcclient.js src/jquery.verto.js
all: jsmin verto-min.js
jsmin: jsmin.c
$(CC) $< -o $@
verto-min.js: jsmin $(JSFILES)
cat $(JSFILES) | ./jsmin > $@
clean:
rm -f verto-min.js jsmin *~
install-demo: all
cp verto-min.js ../demo/js
This file needs to say more.
Documentation for the api needs to be developed with jsdoc-toolkit http://pulkitgoyal.in/documenting-jquery-plugins-jsdoc-toolkit/
Dependancies for DEMO
jquery-2.0.3.min.js
jquery-2.0.3.min.map
jquery.cookie.js
jquery.dataTables.js
jquery.json-2.4.min.js
jquery.mobile-1.3.2.min.js
/* jsmin.c
2013-03-29
Copyright (c) 2002 Douglas Crockford (www.crockford.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The Software shall be used for Good, not Evil.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include <stdlib.h>
#include <stdio.h>
static int theA;
static int theB;
static int theLookahead = EOF;
static int theX = EOF;
static int theY = EOF;
static void
error(char* s)
{
fputs("JSMIN Error: ", stderr);
fputs(s, stderr);
fputc('\n', stderr);
exit(1);
}
/* isAlphanum -- return true if the character is a letter, digit, underscore,
dollar sign, or non-ASCII character.
*/
static int
isAlphanum(int c)
{
return ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') ||
(c >= 'A' && c <= 'Z') || c == '_' || c == '$' || c == '\\' ||
c > 126);
}
/* get -- return the next character from stdin. Watch out for lookahead. If
the character is a control character, translate it to a space or
linefeed.
*/
static int
get()
{
int c = theLookahead;
theLookahead = EOF;
if (c == EOF) {
c = getc(stdin);
}
if (c >= ' ' || c == '\n' || c == EOF) {
return c;
}
if (c == '\r') {
return '\n';
}
return ' ';
}
/* peek -- get the next character without getting it.
*/
static int
peek()
{
theLookahead = get();
return theLookahead;
}
/* next -- get the next character, excluding comments. peek() is used to see
if a '/' is followed by a '/' or '*'.
*/
static int
next()
{
int c = get();
if (c == '/') {
switch (peek()) {
case '/':
for (;;) {
c = get();
if (c <= '\n') {
break;
}
}
break;
case '*':
get();
while (c != ' ') {
switch (get()) {
case '*':
if (peek() == '/') {
get();
c = ' ';
}
break;
case EOF:
error("Unterminated comment.");
}
}
break;
}
}
theY = theX;
theX = c;
return c;
}
/* action -- do something! What you do is determined by the argument:
1 Output A. Copy B to A. Get the next B.
2 Copy B to A. Get the next B. (Delete A).
3 Get the next B. (Delete B).
action treats a string as a single character. Wow!
action recognizes a regular expression if it is preceded by ( or , or =.
*/
static void
action(int d)
{
switch (d) {
case 1:
putc(theA, stdout);
if (
(theY == '\n' || theY == ' ') &&
(theA == '+' || theA == '-' || theA == '*' || theA == '/') &&
(theB == '+' || theB == '-' || theB == '*' || theB == '/')
) {
putc(theY, stdout);
}
case 2:
theA = theB;
if (theA == '\'' || theA == '"' || theA == '`') {
for (;;) {
putc(theA, stdout);
theA = get();
if (theA == theB) {
break;
}
if (theA == '\\') {
putc(theA, stdout);
theA = get();
}
if (theA == EOF) {
error("Unterminated string literal.");
}
}
}
case 3:
theB = next();
if (theB == '/' && (
theA == '(' || theA == ',' || theA == '=' || theA == ':' ||
theA == '[' || theA == '!' || theA == '&' || theA == '|' ||
theA == '?' || theA == '+' || theA == '-' || theA == '~' ||
theA == '*' || theA == '/' || theA == '{' || theA == '\n'
)) {
putc(theA, stdout);
if (theA == '/' || theA == '*') {
putc(' ', stdout);
}
putc(theB, stdout);
for (;;) {
theA = get();
if (theA == '[') {
for (;;) {
putc(theA, stdout);
theA = get();
if (theA == ']') {
break;
}
if (theA == '\\') {
putc(theA, stdout);
theA = get();
}
if (theA == EOF) {
error("Unterminated set in Regular Expression literal.");
}
}
} else if (theA == '/') {
switch (peek()) {
case '/':
case '*':
error("Unterminated set in Regular Expression literal.");
}
break;
} else if (theA =='\\') {
putc(theA, stdout);
theA = get();
}
if (theA == EOF) {
error("Unterminated Regular Expression literal.");
}
putc(theA, stdout);
}
theB = next();
}
}
}
/* jsmin -- Copy the input to the output, deleting the characters which are
insignificant to JavaScript. Comments will be removed. Tabs will be
replaced with spaces. Carriage returns will be replaced with linefeeds.
Most spaces and linefeeds will be removed.
*/
static void
jsmin()
{
if (peek() == 0xEF) {
get();
get();
get();
}
theA = '\n';
action(3);
while (theA != EOF) {
switch (theA) {
case ' ':
action(isAlphanum(theB) ? 1 : 2);
break;
case '\n':
switch (theB) {
case '{':
case '[':
case '(':
case '+':
case '-':
case '!':
case '~':
action(1);
break;
case ' ':
action(3);
break;
default:
action(isAlphanum(theB) ? 1 : 2);
}
break;
default:
switch (theB) {
case ' ':
action(isAlphanum(theA) ? 1 : 3);
break;
case '\n':
switch (theA) {
case '}':
case ']':
case ')':
case '+':
case '-':
case '"':
case '\'':
case '`':
action(1);
break;
default:
action(isAlphanum(theA) ? 1 : 3);
}
break;
default:
action(1);
break;
}
}
}
}
/* main -- Output any command line arguments as comments
and then minify the input.
*/
extern int
main(int argc, char* argv[])
{
int i;
for (i = 1; i < argc; i += 1) {
fprintf(stdout, "// %s\n", argv[i]);
}
jsmin();
return 0;
}
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论