winlin

filter the first non-virtual camera

@@ -43,6 +43,13 @@ @@ -43,6 +43,13 @@
43 for (var i = 0; i < cameras.length; i++) { 43 for (var i = 0; i < cameras.length; i++) {
44 $("#sl_cameras").append("<option value='" + i + "'>" + cameras[i] + "</option"); 44 $("#sl_cameras").append("<option value='" + i + "'>" + cameras[i] + "</option");
45 } 45 }
  46 + // optional: select the first no "virtual" signed.
  47 + for (var i = 0; i < cameras.length; i++) {
  48 + if (cameras[i].toLowerCase().indexOf("virtual") == -1) {
  49 + $("#sl_cameras option[value='" + i + "']").attr("selected", true);
  50 + break;
  51 + }
  52 + }
46 53
47 $("#sl_microphones").empty(); 54 $("#sl_microphones").empty();
48 for (var i = 0; i < microphones.length; i++) { 55 for (var i = 0; i < microphones.length; i++) {