Sfoglia il codice sorgente

摄像头测试2

临城职教中职
坤 梁 2 anni fa
parent
commit
b142701e99
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml

+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml Vedi File

@@ -219,9 +219,9 @@
$("#showImg").show(); //将拍照结果显示 $("#showImg").show(); //将拍照结果显示
}); });
// 遍历所有的设备,包括视频和音频设备,找到摄像头 // 遍历所有的设备,包括视频和音频设备,找到摄像头
function gotDevices(deviceInfos) {
console.log(deviceInfos);
}
//function gotDevices(deviceInfos) {
// console.log(deviceInfos);
//}


function handleError(error) { function handleError(error) {
console.log('Error: ', error); console.log('Error: ', error);
@@ -273,7 +273,7 @@
console.log('menumerateDevices is not supported!'); console.log('menumerateDevices is not supported!');
} else { } else {
navigator.mediaDevices.enumerateDevices() navigator.mediaDevices.enumerateDevices()
.then(gotDevices).catch(handleError);
.then(takePhoto).catch(handleError);
} }
//takePhoto(); //takePhoto();
} }


Caricamento…
Annulla
Salva