Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e7f19d62
提交
e7f19d62
authored
2月 23, 2015
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7509: add a way to choose bandwidth
上级
001d7b51
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
265 行增加
和
31 行删除
+265
-31
index.html
html5/verto/video_demo/index.html
+91
-30
verto.js
html5/verto/video_demo/verto.js
+162
-0
mod_verto.c
src/mod/endpoints/mod_verto/mod_verto.c
+12
-1
没有找到文件。
html5/verto/video_demo/index.html
浏览文件 @
e7f19d62
...
...
@@ -95,8 +95,29 @@
<table
width=
"1000"
cellspacing=
"0"
cellpadding=
"0"
border=
"0"
align=
"center"
id=
"conf_list"
class=
"jsDataTable"
>
</table>
</div>
<br
clear=
all
>
<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>-->
<span
class=
"sharediv"
>
<button
data-inline=
"true"
id=
"sharebtn"
>
Share
</button>
<button
data-inline=
"true"
id=
"nosharebtn"
>
End Share
</button>
</span>
<span
class=
"sharediv"
>
<button
data-inline=
"true"
id=
"smallerbtn"
>
Smaller -
</button>
<button
data-inline=
"true"
id=
"biggerbtn"
>
Bigger +
</button>
<button
data-inline=
"true"
id=
"fullbtn"
>
Full Screen
</button>
</span>
<div
id=
"media"
>
<video
id=
"webcam"
autoplay=
"autoplay"
></video>
</div>
<br><br>
<br>
<div
id=
"message"
hidden=
"true"
>
<hr
class=
"l1"
width=
"500"
/>
<div
id=
"chatwin"
></div>
...
...
@@ -115,34 +136,9 @@
<div
id=
"conf_mod"
></div>
<div
style=
"color:blue"
id=
"conf_display"
></div>
<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>-->
<span
class=
"sharediv"
>
<button
data-inline=
"true"
id=
"sharebtn"
>
Share
</button>
<button
data-inline=
"true"
id=
"nosharebtn"
>
End Share
</button>
</span>
<br><br><br>
<img
src=
"img/verto_black_web.gif"
width=
"300"
><br><br>
<div
id=
"media"
>
<div
class=
"sharediv"
>
<button
data-inline=
"true"
id=
"smallerbtn"
>
Smaller -
</button>
<button
data-inline=
"true"
id=
"biggerbtn"
>
Bigger +
</button>
<button
data-inline=
"true"
id=
"fullbtn"
>
Full Screen
</button>
</div>
<table
border=
0
cellspacing=
0
cellpadding=
0
width=
95%
><tr>
<td
valign=
top
align=
center
><video
id=
"webcam"
autoplay=
"autoplay"
></video></td>
</tr><tr>
<!-- <td valign=top align=left>
<br><br><video id="local_webcam" autoplay="autoplay" style="transform: scale(-1, 1);webkit-transform: scale(-1, 1);"></video></td>-->
</tr></table>
</div>
<div
id=
keypad
>
<button
class=
"dtmf"
data-inline=
"true"
>
1
</button>
...
...
@@ -259,13 +255,12 @@ function dial(ext)
<input
type=
"radio"
name=
"vqual"
id=
"vqual_vga"
value=
"vga"
>
<label
for=
"vqual_vga"
>
VGA 640x480
</label>
<input
type=
"radio"
name=
"vqual"
id=
"vqual_qvga_wide"
value=
"qvga_wide"
>
<label
for=
"vqual_qvga_wide"
>
QVGA WIDE 320x180
</label>
<input
type=
"radio"
name=
"vqual"
id=
"vqual_vga_wide"
value=
"vga_wide"
>
<label
for=
"vqual_vga_wide"
>
VGA WIDE 640x360
</label>
<input
type=
"radio"
name=
"vqual"
id=
"vqual_hd"
value=
"hd"
>
<label
for=
"vqual_hd"
>
HD 1280x720
</label>
...
...
@@ -273,9 +268,75 @@ function dial(ext)
<label
for=
"vqual_hhd"
>
HHD 1920x1080
</label>
</fieldset>
</div><Br>
</div><br
clear=
"all"
><br>
<div
>
<fieldset
data-role=
"controlgroup"
data-type=
"horizontal"
>
<legend><b>
Max Outgoing Bandwidth
</b>
:
</legend>
<input
type=
"radio"
name=
"outgoingBandwidth"
id=
"outgoingBandwidth_250kb"
value=
"250"
>
<label
for=
"outgoingBandwidth_250kb"
>
250kb
</label>
<input
type=
"radio"
name=
"outgoingBandwidth"
id=
"outgoingBandwidth_500kb"
value=
"500"
>
<label
for=
"outgoingBandwidth_500kb"
>
500kb
</label>
<input
type=
"radio"
name=
"outgoingBandwidth"
id=
"outgoingBandwidth_1024kb"
value=
"1024"
>
<label
for=
"outgoingBandwidth_1024kb"
>
1mb
</label>
<input
type=
"radio"
name=
"outgoingBandwidth"
id=
"outgoingBandwidth_1536kb"
value=
"1536"
>
<label
for=
"outgoingBandwidth_1536kb"
>
1.5mb
</label>
<input
type=
"radio"
name=
"outgoingBandwidth"
id=
"outgoingBandwidth_2048kb"
value=
"2048"
>
<label
for=
"outgoingBandwidth_2048kb"
>
2mb
</label>
<input
type=
"radio"
name=
"outgoingBandwidth"
id=
"outgoingBandwidth_5120kb"
value=
"5120"
>
<label
for=
"outgoingBandwidth_5120kb"
>
5mb
</label>
<input
type=
"radio"
name=
"outgoingBandwidth"
id=
"outgoingBandwidth_0kb"
value=
"0"
>
<label
for=
"outgoingBandwidth_0kb"
>
No Limit
</label>
<input
type=
"radio"
name=
"outgoingBandwidth"
id=
"outgoingBandwidth_default"
value=
"default"
>
<label
for=
"outgoingBandwidth_default"
>
Server Default
</label>
</fieldset>
</div><br
clear=
"all"
><br>
<div
>
<fieldset
data-role=
"controlgroup"
data-type=
"horizontal"
>
<legend><b>
Max Incoming Bandwidth
</b>
:
</legend>
<input
type=
"radio"
name=
"incomingBandwidth"
id=
"incomingBandwidth_250kb"
value=
"250"
>
<label
for=
"incomingBandwidth_250kb"
>
250kb
</label>
<input
type=
"radio"
name=
"incomingBandwidth"
id=
"incomingBandwidth_500kb"
value=
"500"
>
<label
for=
"incomingBandwidth_500kb"
>
500kb
</label>
<input
type=
"radio"
name=
"incomingBandwidth"
id=
"incomingBandwidth_1024kb"
value=
"1024"
>
<label
for=
"incomingBandwidth_1024kb"
>
1mb
</label>
<input
type=
"radio"
name=
"incomingBandwidth"
id=
"incomingBandwidth_1536kb"
value=
"1536"
>
<label
for=
"incomingBandwidth_1536kb"
>
1.5mb
</label>
<input
type=
"radio"
name=
"incomingBandwidth"
id=
"incomingBandwidth_2048kb"
value=
"2048"
>
<label
for=
"incomingBandwidth_2048kb"
>
2mb
</label>
<input
type=
"radio"
name=
"incomingBandwidth"
id=
"incomingBandwidth_5120kb"
value=
"5120"
>
<label
for=
"incomingBandwidth_5120kb"
>
5mb
</label>
<input
type=
"radio"
name=
"incomingBandwidth"
id=
"incomingBandwidth_0kb"
value=
"0"
>
<label
for=
"incomingBandwidth_0kb"
>
No Limit
</label>
<input
type=
"radio"
name=
"incomingBandwidth"
id=
"incomingBandwidth_default"
value=
"default"
>
<label
for=
"incomingBandwidth_default"
>
Server Default
</label>
</fieldset>
</div><br
clear=
"all"
><br>
<br
clear=
"all"
>
</div>
<button
data-inline=
"true"
id=
"showdemo"
onclick=
"$('#demos').show();$('#showdemo').hide()"
>
View Demo Extensions
</button>
<button
data-inline=
"true"
id=
"showdevices"
onclick=
"$('#devices').show();$('#showdevices').hide()"
>
View Device Settings
</button>
...
...
html5/verto/video_demo/verto.js
浏览文件 @
e7f19d62
...
...
@@ -13,6 +13,8 @@ var vid_height = 180;
var
local_vid_width
=
320
;
var
local_vid_height
=
180
;
var
outgoingBandwidth
;
var
incomingBandwidth
;
$
(
".selector"
).
pagecontainer
({
"theme"
:
"a"
});
...
...
@@ -537,6 +539,8 @@ function docall() {
destination_number
:
$
(
"#ext"
).
val
(),
caller_id_name
:
$
(
"#name"
).
val
(),
caller_id_number
:
$
(
"#cid"
).
val
(),
outgoingBandwidth
:
outgoingBandwidth
,
incomingBandwidth
:
incomingBandwidth
,
useVideo
:
check_vid
(),
useStereo
:
$
(
"#use_stereo"
).
is
(
':checked'
),
useCamera
:
$
(
"#usecamera"
).
find
(
":selected"
).
val
(),
...
...
@@ -567,6 +571,8 @@ function doshare(on) {
destination_number
:
$
(
"#ext"
).
val
()
+
"-screen"
,
caller_id_name
:
$
(
"#name"
).
val
()
+
" (Screen)"
,
caller_id_number
:
$
(
"#cid"
).
val
()
+
" (screen)"
,
outgoingBandwidth
:
outgoingBandwidth
,
incomingBandwidth
:
incomingBandwidth
,
videoParams
:
screen_constraints
.
video
.
mandatory
,
useVideo
:
true
,
screenShare
:
true
...
...
@@ -707,6 +713,162 @@ function init() {
});
});
//
outgoingBandwidth
=
$
.
cookie
(
"verto_demo_outgoingBandwidth"
)
||
"default"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
$
(
"#outgoingBandwidth_250kb"
).
prop
(
"checked"
,
outgoingBandwidth
===
"250"
).
change
(
function
(
e
)
{
if
(
$
(
"#outgoingBandwidth_250kb"
).
is
(
':checked'
))
{
outgoingBandwidth
=
"250"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#outgoingBandwidth_500kb"
).
prop
(
"checked"
,
outgoingBandwidth
===
"500"
).
change
(
function
(
e
)
{
if
(
$
(
"#outgoingBandwidth_500kb"
).
is
(
':checked'
))
{
outgoingBandwidth
=
"500"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#outgoingBandwidth_1024kb"
).
prop
(
"checked"
,
outgoingBandwidth
===
"1024"
).
change
(
function
(
e
)
{
if
(
$
(
"#outgoingBandwidth_1024kb"
).
is
(
':checked'
))
{
outgoingBandwidth
=
"1024"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#outgoingBandwidth_1536kb"
).
prop
(
"checked"
,
outgoingBandwidth
===
"1536"
).
change
(
function
(
e
)
{
if
(
$
(
"#outgoingBandwidth_1536kb"
).
is
(
':checked'
))
{
outgoingBandwidth
=
"1536"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#outgoingBandwidth_2048kb"
).
prop
(
"checked"
,
outgoingBandwidth
===
"2048"
).
change
(
function
(
e
)
{
if
(
$
(
"#outgoingBandwidth_2048kb"
).
is
(
':checked'
))
{
outgoingBandwidth
=
"2048"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#outgoingBandwidth_5120kb"
).
prop
(
"checked"
,
outgoingBandwidth
===
"5120"
).
change
(
function
(
e
)
{
if
(
$
(
"#outgoingBandwidth_5120kb"
).
is
(
':checked'
))
{
outgoingBandwidth
=
"5120"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#outgoingBandwidth_0kb"
).
prop
(
"checked"
,
outgoingBandwidth
===
"0"
).
change
(
function
(
e
)
{
if
(
$
(
"#outgoingBandwidth_0kb"
).
is
(
':checked'
))
{
outgoingBandwidth
=
"0"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#outgoingBandwidth_default"
).
prop
(
"checked"
,
outgoingBandwidth
===
"default"
).
change
(
function
(
e
)
{
if
(
$
(
"#outgoingBandwidth_default"
).
is
(
':checked'
))
{
outgoingBandwidth
=
"default"
;
$
.
cookie
(
"verto_demo_outgoingBandwidth"
,
outgoingBandwidth
,
{
expires
:
365
});
}
});
//
incomingBandwidth
=
$
.
cookie
(
"verto_demo_incomingBandwidth"
)
||
"default"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
$
(
"#incomingBandwidth_250kb"
).
prop
(
"checked"
,
incomingBandwidth
===
"250"
).
change
(
function
(
e
)
{
if
(
$
(
"#incomingBandwidth_250kb"
).
is
(
':checked'
))
{
incomingBandwidth
=
"250"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#incomingBandwidth_500kb"
).
prop
(
"checked"
,
incomingBandwidth
===
"500"
).
change
(
function
(
e
)
{
if
(
$
(
"#incomingBandwidth_500kb"
).
is
(
':checked'
))
{
incomingBandwidth
=
"500"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#incomingBandwidth_1024kb"
).
prop
(
"checked"
,
incomingBandwidth
===
"1024"
).
change
(
function
(
e
)
{
if
(
$
(
"#incomingBandwidth_1024kb"
).
is
(
':checked'
))
{
incomingBandwidth
=
"1024"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#incomingBandwidth_1536kb"
).
prop
(
"checked"
,
incomingBandwidth
===
"1536"
).
change
(
function
(
e
)
{
if
(
$
(
"#incomingBandwidth_1536kb"
).
is
(
':checked'
))
{
incomingBandwidth
=
"1536"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#incomingBandwidth_2048kb"
).
prop
(
"checked"
,
incomingBandwidth
===
"2048"
).
change
(
function
(
e
)
{
if
(
$
(
"#incomingBandwidth_2048kb"
).
is
(
':checked'
))
{
incomingBandwidth
=
"2048"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#incomingBandwidth_5120kb"
).
prop
(
"checked"
,
incomingBandwidth
===
"5120"
).
change
(
function
(
e
)
{
if
(
$
(
"#incomingBandwidth_5120kb"
).
is
(
':checked'
))
{
incomingBandwidth
=
"5120"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#incomingBandwidth_0kb"
).
prop
(
"checked"
,
incomingBandwidth
===
"0"
).
change
(
function
(
e
)
{
if
(
$
(
"#incomingBandwidth_0kb"
).
is
(
':checked'
))
{
incomingBandwidth
=
"0"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
}
});
$
(
"#incomingBandwidth_default"
).
prop
(
"checked"
,
incomingBandwidth
===
"default"
).
change
(
function
(
e
)
{
if
(
$
(
"#incomingBandwidth_default"
).
is
(
':checked'
))
{
incomingBandwidth
=
"default"
;
$
.
cookie
(
"verto_demo_incomingBandwidth"
,
incomingBandwidth
,
{
expires
:
365
});
}
});
//
var
vqual
=
$
.
cookie
(
"verto_demo_vqual"
)
||
"qvga"
;
$
.
cookie
(
"verto_demo_vqual"
,
vqual
,
{
...
...
src/mod/endpoints/mod_verto/mod_verto.c
浏览文件 @
e7f19d62
...
...
@@ -3214,7 +3214,7 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock
cJSON
*
dialog
;
verto_pvt_t
*
tech_pvt
;
char
name
[
512
];
const
char
*
var
,
*
destination_number
,
*
call_id
=
NULL
,
*
sdp
=
NULL
,
const
char
*
var
,
*
destination_number
,
*
call_id
=
NULL
,
*
sdp
=
NULL
,
*
bandwidth
=
NULL
,
*
caller_id_name
=
NULL
,
*
caller_id_number
=
NULL
,
*
remote_caller_id_name
=
NULL
,
*
remote_caller_id_number
=
NULL
,
*
context
=
NULL
;
*
response
=
obj
;
...
...
@@ -3274,6 +3274,17 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock
switch_channel_set_flag
(
channel
,
CF_VIDEO_ONLY
);
}
if
((
bandwidth
=
cJSON_GetObjectCstr
(
dialog
,
"outgoingBandwidth"
)))
{
if
(
strcasecmp
(
bandwidth
,
"default"
))
{
switch_channel_set_variable
(
channel
,
"rtp_video_max_bandwidth_in"
,
bandwidth
);
}
}
if
((
bandwidth
=
cJSON_GetObjectCstr
(
dialog
,
"incomingBandwidth"
)))
{
if
(
strcasecmp
(
bandwidth
,
"default"
))
{
switch_channel_set_variable
(
channel
,
"rtp_video_max_bandwidth_out"
,
bandwidth
);
}
}
switch_snprintf
(
name
,
sizeof
(
name
),
"verto.rtc/%s"
,
destination_number
);
switch_channel_set_name
(
channel
,
name
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论