Ionic1 webRTC works on Chrome but not on Mozilla and app

I am working on using webRTC to read the camera stream but it is working on Chrome and not on Mozilla and when I tried building to app. It didn’t work either. Please guys what am I doing wrong? I am using the navigate.mediaDevices.getUserMedia method.