Skip to content

Commit

Permalink
Fixing issue bensonruan#7 with enviroNment view
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Averin committed Jun 24, 2021
1 parent 0ebfea6 commit abb861f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 187 deletions.
184 changes: 0 additions & 184 deletions dist/webcam-easy.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/webcam-easy.min.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/webcam-easy.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class Webcam {
selectCamera(){
for(let webcam of this._webcamList){
if( (this._facingMode=='user' && webcam.label.toLowerCase().includes('front'))
|| (this._facingMode=='enviroment' && webcam.label.toLowerCase().includes('back'))
|| (this._facingMode=='environment' && webcam.label.toLowerCase().includes('back'))
)
{
this._selectedDeviceId = webcam.deviceId;
Expand All @@ -75,7 +75,7 @@ export default class Webcam {

/* Change Facing mode and selected camera */
flip(){
this._facingMode = (this._facingMode == 'user')? 'enviroment': 'user';
this._facingMode = (this._facingMode == 'user')? 'environment' : 'user';
this._webcamElement.style.transform = "";
this.selectCamera();
}
Expand Down

0 comments on commit abb861f

Please sign in to comment.