diff --git a/trunk/research/players/js/srs.page.js b/trunk/research/players/js/srs.page.js
index 93d9fce83..2463fd3fd 100755
--- a/trunk/research/players/js/srs.page.js
+++ b/trunk/research/players/js/srs.page.js
@@ -148,17 +148,29 @@ function srs_initialize_codec_page(
for (var i = 0; i < cameras.length; i++) {
$(sl_cameras).append("= 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("= 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;
}
}
diff --git a/trunk/research/players/srs_chat.html b/trunk/research/players/srs_chat.html
index 4e1a9c7de..7e2a513d3 100755
--- a/trunk/research/players/srs_chat.html
+++ b/trunk/research/players/srs_chat.html
@@ -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;