Browse Source

摄像头测试2

临城职教中职
坤 梁 2 years ago
parent
commit
b142701e99
1 changed files with 4 additions and 4 deletions
  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 View File

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

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


Loading…
Cancel
Save