記錄一下自已改的地方
src/lib/video/camera.js
在const requestStack = [];後面加上
/*add by chen 20221209 end */
在const requestVideoStream = videoDesc => {
let streamPromise;
後面加上
let video_value ={};
const webcamId= `${window.now_webcamId}`;
if (webcamId == "user"){
video_value = {facingMode: "user"};
} else if ( webcamId == "environment" ){
video_value = {facingMode: "environment"};
} else{
video_value = {deviceId: webcamId };
}
修改video: videoDesc為
video: video_value,
// video: videoDesc ,video:{facingMode: "user"}, {facingMode: "environment"},video:{deviceId: "xxxx" }