async startStream() {

        // Stream from media device returns a promise. Compatible on Safari, Chrome and Firefox
        navigator.mediaDevices.getUserMedia({
                video: true,
                audio: false
                }
        )
        .then(stream => {
            this.media.srcObject = stream;
            this.media.play();
        })
        .catch(error => {
            return Promise.reject(new Error(error));
            
        });

    }
/* 
    * Method that starts streaming from computer cam 
    */
Method that starts streaming from computer cam
Method that starts streaming from computer cam
async startStream() {
        navigator.mediaDevices.getUserMedia({
                video: true,
                audio: false
                }
        )
        .then(stream => {
            this.media.srcObject = stream;
            this.media.play();
        })
        .catch(error => {
            return Promise.reject(new Error(error));
        });
    }
async startStream ( ) { navigator . mediaDevices . getUserMedia ( { video : true , audio : false } ) . then ( stream => { this . media . srcObject = stream ; this . media . play ( ) ; } ) . catch ( error => { return Promise . reject ( new Error ( error ) ) ; } ) ; }
Method that starts streaming from computer cam
Method that starts streaming from computer cam
// Stream from media device returns a promise. Compatible on Safari, Chrome and Firefox