justadudewhohacks / face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
MIT License
16.76k stars 3.73k forks source link

face-api.js does not open camera preview in iOS devices #781

Open sndsh7 opened 3 years ago

sndsh7 commented 3 years ago

working with MacBook safari and chrome android phones it's working fine but whenever i try to open web page on iPhone it getting black screen please help me out from this please provide guidance

`Promise.all([ faceapi.nets.tinyFaceDetector.loadFromUri('/models'), // faceapi.nets.faceLandmark68Net.loadFromUri('/models'), // faceapi.nets.faceRecognitionNet.loadFromUri('/models'), faceapi.nets.faceExpressionNet.loadFromUri('/models') ]).then(startVideo)

function startVideo() { navigator.mediaDevices.getUserMedia( { video: {} } // stream => video.srcObject = stream, // err => console.error(err), ).then((stream)=>{video.srcObject = stream;},(err)=>console.log(err)); }`

uguraktas commented 2 years ago

Is there any solution to this?

manish-joshi-1996 commented 2 years ago

DId anyone found out any solution for this?