Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
a80c7394
提交
a80c7394
authored
1月 03, 2015
作者:
Seven Du
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7127 #comment follow jshint advices
上级
0db3b1e3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
34 行增加
和
32 行删除
+34
-32
jquery.FSRTC.js
html5/verto/js/src/jquery.FSRTC.js
+2
-2
jquery.jsonrpcclient.js
html5/verto/js/src/jquery.jsonrpcclient.js
+24
-21
jquery.verto.js
html5/verto/js/src/jquery.verto.js
+8
-9
没有找到文件。
html5/verto/js/src/jquery.FSRTC.js
浏览文件 @
a80c7394
...
...
@@ -431,13 +431,13 @@
var
iceServers
=
null
;
if
(
options
.
iceServers
)
{
var
tmp
=
options
.
iceServers
;
;
var
tmp
=
options
.
iceServers
;
if
(
typeof
(
tmp
)
===
"boolean"
)
{
tmp
=
null
;
}
if
(
tmp
&&
typeof
(
tmp
)
!==
"array"
)
{
if
(
!
(
tmp
&&
typeof
(
tmp
)
==
"object"
&&
tmp
.
constructor
===
Array
)
)
{
console
.
warn
(
"iceServers must be an array, reverting to default ice servers"
);
tmp
=
null
;
}
...
...
html5/verto/js/src/jquery.jsonrpcclient.js
浏览文件 @
a80c7394
...
...
@@ -247,19 +247,19 @@
}
return
true
;
}
}
;
$
.
JsonRpcClient
.
prototype
.
closeSocket
=
function
()
{
if
(
self
.
socketReady
())
{
this
.
_ws_socket
.
onclose
=
function
(
w
)
{
console
.
log
(
"Closing Socket"
)
}
this
.
_ws_socket
.
onclose
=
function
(
w
)
{
console
.
log
(
"Closing Socket"
)
;};
this
.
_ws_socket
.
close
();
}
}
}
;
$
.
JsonRpcClient
.
prototype
.
loginData
=
function
(
params
)
{
self
.
options
.
login
=
params
.
login
;
self
.
options
.
passwd
=
params
.
passwd
;
}
}
;
$
.
JsonRpcClient
.
prototype
.
connectSocket
=
function
(
onmessage_cb
)
{
var
self
=
this
;
...
...
@@ -299,10 +299,10 @@
self
.
ws_cnt
++
;
if
(
self
.
ws_sleep
<
3000
&&
(
self
.
ws_cnt
%
10
)
==
0
)
{
if
(
self
.
ws_sleep
<
3000
&&
(
self
.
ws_cnt
%
10
)
==
=
0
)
{
self
.
ws_sleep
+=
1000
;
}
}
}
;
// Set up sending of message for when the socket is open.
self
.
_ws_socket
.
onopen
=
function
()
{
...
...
@@ -317,15 +317,15 @@
var
req
;
// Send the requests.
while
(
req
=
$
.
JsonRpcClient
.
q
.
pop
(
))
{
while
(
(
req
=
$
.
JsonRpcClient
.
q
.
pop
()
))
{
self
.
_ws_socket
.
send
(
req
);
}
}
}
;
}
}
return
self
.
_ws_socket
?
true
:
false
;
}
}
;
$
.
JsonRpcClient
.
prototype
.
_getSocket
=
function
(
onmessage_cb
)
{
// If there is no ws url set, we don't have a socket.
...
...
@@ -381,9 +381,9 @@
/// @todo Make using the jsonrcp 2.0 check optional, to use this on JSON-RPC 1 backends.
if
(
typeof
response
===
'object'
&&
'jsonrpc'
in
response
&&
response
.
jsonrpc
===
'2.0'
)
{
if
(
typeof
response
===
'object'
&&
'jsonrpc'
in
response
&&
response
.
jsonrpc
===
'2.0'
)
{
/// @todo Handle bad response (without id).
...
...
@@ -419,8 +419,7 @@
self
.
authing
=
true
;
this
.
call
(
"login"
,
{
login
:
self
.
options
.
login
,
passwd
:
self
.
options
.
passwd
},
this
.
_ws_callbacks
[
response
.
id
].
request_obj
.
method
==
"login"
?
this
.
_ws_callbacks
[
response
.
id
].
request_obj
.
method
==
"login"
?
function
(
e
)
{
self
.
authing
=
false
;
console
.
log
(
"logged in"
);
...
...
@@ -575,14 +574,18 @@
// Collect all request data and sort handlers by request id.
var
batch_request
=
[];
var
handlers
=
{};
var
i
=
0
;
var
call
;
var
success_cb
;
var
error_cb
;
// If we have a WebSocket, just send the requests individually like normal calls.
var
socket
=
self
.
jsonrpcclient
.
options
.
getSocket
(
self
.
jsonrpcclient
.
wsOnMessage
);
if
(
socket
!==
null
)
{
for
(
var
i
=
0
;
i
<
this
.
_requests
.
length
;
i
++
)
{
var
call
=
this
.
_requests
[
i
];
var
success_cb
=
(
'success_cb'
in
call
)
?
call
.
success_cb
:
undefined
;
var
error_cb
=
(
'error_cb'
in
call
)
?
call
.
error_cb
:
undefined
;
for
(
i
=
0
;
i
<
this
.
_requests
.
length
;
i
++
)
{
call
=
this
.
_requests
[
i
];
success_cb
=
(
'success_cb'
in
call
)
?
call
.
success_cb
:
undefined
;
error_cb
=
(
'error_cb'
in
call
)
?
call
.
error_cb
:
undefined
;
self
.
jsonrpcclient
.
_wsCall
(
socket
,
call
.
request
,
success_cb
,
error_cb
);
}
...
...
@@ -590,8 +593,8 @@
return
;
}
for
(
var
i
=
0
;
i
<
this
.
_requests
.
length
;
i
++
)
{
var
call
=
this
.
_requests
[
i
];
for
(
i
=
0
;
i
<
this
.
_requests
.
length
;
i
++
)
{
call
=
this
.
_requests
[
i
];
batch_request
.
push
(
call
.
request
);
// If the request has an id, it should handle returns (otherwise it's a notify).
...
...
@@ -603,7 +606,7 @@
}
}
var
success_cb
=
function
(
data
)
{
self
.
_batchCb
(
data
,
handlers
,
self
.
all_done_cb
);
};
success_cb
=
function
(
data
)
{
self
.
_batchCb
(
data
,
handlers
,
self
.
all_done_cb
);
};
// No WebSocket, and no HTTP backend? This won't work.
if
(
self
.
jsonrpcclient
.
options
.
ajaxUrl
===
null
)
{
...
...
html5/verto/js/src/jquery.verto.js
浏览文件 @
a80c7394
...
...
@@ -1137,7 +1137,7 @@
$
.
verto
.
confMan
=
function
(
verto
,
params
)
{
var
confMan
=
this
;
conf
confMan
.
params
=
$
.
extend
({
tableID
:
null
,
statusID
:
null
,
...
...
@@ -1164,9 +1164,8 @@
"<button class='ctlbtn' id='"
+
play_id
+
"'>Play</button>"
+
"<button class='ctlbtn' id='"
+
stop_id
+
"'>Stop</button>"
+
"<button class='ctlbtn' id='"
+
recording_id
+
"'>Record</button>"
+
"<button class='ctlbtn' id='"
+
rec_stop_id
+
"'>Record Stop</button>"
+
"<br><br></div>"
;
"<button class='ctlbtn' id='"
+
rec_stop_id
+
"'>Record Stop</button>"
+
"<br><br></div>"
;
jq
.
html
(
html
);
...
...
@@ -1260,7 +1259,7 @@
if
(
confMan
.
params
.
mainModID
)
{
genMainMod
(
$
(
confMan
.
params
.
mainModID
));
$
(
confMan
.
params
.
displayID
).
html
(
"Moderator Controls Ready<br><br>"
)
$
(
confMan
.
params
.
displayID
).
html
(
"Moderator Controls Ready<br><br>"
)
;
}
else
{
$
(
confMan
.
params
.
mainModID
).
html
(
""
);
}
...
...
@@ -1277,7 +1276,7 @@
clearTimeout
(
confMan
.
lastTimeout
);
confMan
.
lastTimeout
=
0
;
}
confMan
.
lastTimeout
=
setTimeout
(
function
()
{
$
(
confMan
.
params
.
displayID
).
html
(
confMan
.
destroyed
?
""
:
"Moderator Controls Ready<br><br>"
)},
4000
);
confMan
.
lastTimeout
=
setTimeout
(
function
()
{
$
(
confMan
.
params
.
displayID
).
html
(
confMan
.
destroyed
?
""
:
"Moderator Controls Ready<br><br>"
)
;
},
4000
);
}
}
});
...
...
@@ -1349,7 +1348,7 @@
"fnRowCallback"
:
row_callback
});
}
}
;
$
.
verto
.
confMan
.
prototype
.
modCommand
=
function
(
cmd
,
id
,
value
)
{
var
confMan
=
this
;
...
...
@@ -1363,7 +1362,7 @@
"value"
:
value
}
});
}
}
;
$
.
verto
.
confMan
.
prototype
.
destroy
=
function
()
{
var
confMan
=
this
;
...
...
@@ -1381,7 +1380,7 @@
if
(
confMan
.
params
.
mainModID
)
{
$
(
confMan
.
params
.
mainModID
).
html
(
""
);
}
}
}
;
$
.
verto
.
dialog
=
function
(
direction
,
verto
,
params
)
{
var
dialog
=
this
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论