Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-12-25 22:01:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ec5e33f3bc4edd66b85f8fb17e83315a6f9bf195
ec5e33f3
1 parent
7ed8cc2b
refine the filter of camera and microphone
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
38 行增加
和
14 行删除
trunk/research/players/js/srs.page.js
trunk/research/players/srs_chat.html
trunk/research/players/js/srs.page.js
查看文件 @
ec5e33f
...
...
@@ -148,17 +148,29 @@ function srs_initialize_codec_page(
for
(
var
i
=
0
;
i
<
cameras
.
length
;
i
++
)
{
$
(
sl_cameras
).
append
(
"<option value='"
+
i
+
"'>"
+
cameras
[
i
]
+
"</option"
);
}
// optional: select the first no "virtual" signed.
// optional: select the except matches
matchs
=
[
"virtual"
];
for
(
var
i
=
0
;
i
<
cameras
.
length
;
i
++
)
{
if
(
cameras
[
i
].
toLowerCase
().
indexOf
(
"virtual"
)
==
-
1
)
{
$
(
sl_cameras
+
" option[value='"
+
i
+
"']"
).
attr
(
"selected"
,
true
);
for
(
var
j
=
0
;
j
<
matchs
.
length
;
j
++
)
{
if
(
cameras
[
i
].
toLowerCase
().
indexOf
(
matchs
[
j
])
==
-
1
)
{
$
(
sl_cameras
+
" option[value='"
+
i
+
"']"
).
attr
(
"selected"
,
true
);
break
;
}
}
if
(
j
<
matchs
.
length
)
{
break
;
}
}
// optional: select the first "integrated" signed.
// optional: select the first matched.
matchs
=
[
"turevision"
,
"integrated"
];
for
(
var
i
=
0
;
i
<
cameras
.
length
;
i
++
)
{
if
(
cameras
[
i
].
toLowerCase
().
indexOf
(
"integrated"
)
>=
0
)
{
$
(
sl_cameras
+
" option[value='"
+
i
+
"']"
).
attr
(
"selected"
,
true
);
for
(
var
j
=
0
;
j
<
matchs
.
length
;
j
++
)
{
if
(
cameras
[
i
].
toLowerCase
().
indexOf
(
matchs
[
j
])
>=
0
)
{
$
(
sl_cameras
+
" option[value='"
+
i
+
"']"
).
attr
(
"selected"
,
true
);
break
;
}
}
if
(
j
<
matchs
.
length
)
{
break
;
}
}
...
...
@@ -167,17 +179,29 @@ function srs_initialize_codec_page(
for
(
var
i
=
0
;
i
<
microphones
.
length
;
i
++
)
{
$
(
sl_microphones
).
append
(
"<option value='"
+
i
+
"'>"
+
microphones
[
i
]
+
"</option"
);
}
// optional: select the first no "default" signed.
// optional: select the except matches
matchs
=
[
"default"
];
for
(
var
i
=
0
;
i
<
microphones
.
length
;
i
++
)
{
if
(
microphones
[
i
].
toLowerCase
().
indexOf
(
"default"
)
==
-
1
)
{
$
(
sl_microphones
+
" option[value='"
+
i
+
"']"
).
attr
(
"selected"
,
true
);
for
(
var
j
=
0
;
j
<
matchs
.
length
;
j
++
)
{
if
(
microphones
[
i
].
toLowerCase
().
indexOf
(
matchs
[
j
])
==
-
1
)
{
$
(
sl_microphones
+
" option[value='"
+
i
+
"']"
).
attr
(
"selected"
,
true
);
break
;
}
}
if
(
j
<
matchs
.
length
)
{
break
;
}
}
// optional: select the first "realtek" signed.
// optional: select the first matched.
matchs
=
[
"realtek"
,
"内置式麦克风"
];
for
(
var
i
=
0
;
i
<
microphones
.
length
;
i
++
)
{
if
(
microphones
[
i
].
toLowerCase
().
indexOf
(
"realtek"
)
>=
0
)
{
$
(
sl_microphones
+
" option[value='"
+
i
+
"']"
).
attr
(
"selected"
,
true
);
for
(
var
j
=
0
;
j
<
matchs
.
length
;
j
++
)
{
if
(
microphones
[
i
].
toLowerCase
().
indexOf
(
matchs
[
j
])
>=
0
)
{
$
(
sl_microphones
+
" option[value='"
+
i
+
"']"
).
attr
(
"selected"
,
true
);
break
;
}
}
if
(
j
<
matchs
.
length
)
{
break
;
}
}
...
...
trunk/research/players/srs_chat.html
查看文件 @
ec5e33f
...
...
@@ -373,7 +373,7 @@
}
function
on_user_publish
()
{
if
(
$
(
"#txt_name"
).
val
()
.
trim
()
==
""
)
{
if
(
$
(
"#txt_name"
).
val
()
==
""
)
{
$
(
"#txt_name"
).
focus
().
parent
().
parent
().
addClass
(
"error"
);
warn
(
100
,
"请输入您的名字"
);
return
;
...
...
@@ -460,7 +460,7 @@
var
chat
=
{};
chat
.
id
=
-
1
;
chat
.
username
=
$
(
"#txt_name"
).
val
()
.
trim
()
;
chat
.
username
=
$
(
"#txt_name"
).
val
();
chat
.
agent
=
navigator
.
userAgent
;
chat
.
url
=
url
;
chat
.
vcodec
=
vcodec
;
...
...
请
注册
或
登录
后发表评论