File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -932,7 +932,8 @@ sap.ui.define("z2ui5/CameraPicture", [
932932 id : { type : "string" } ,
933933 value : { type : "string" } ,
934934 press : { type : "string" } ,
935- autoplay : { type : "boolean" , defaultValue : true }
935+ autoplay : { type : "boolean" , defaultValue : true } ,
936+ facingMode : { type : "string" , defaultValue : "environment" }
936937 } ,
937938 events : {
938939 "OnPhoto" : {
@@ -1001,12 +1002,12 @@ sap.ui.define("z2ui5/CameraPicture", [
10011002 setTimeout ( function ( ) {
10021003 var video = document . querySelector ( '#zvideo' ) ;
10031004 if ( navigator . mediaDevices . getUserMedia ) {
1004- navigator . mediaDevices . getUserMedia ( { video : { facingMode : { exact : "environment" } } } )
1005+ navigator . mediaDevices . getUserMedia ( { video : { facingMode : { exact : this . getProperty ( "facingMode" ) } } } )
10051006 . then ( function ( stream ) {
10061007 video . srcObject = stream ;
10071008 } )
10081009 . catch ( function ( error ) {
1009- console . log ( "Something went wrong!" ) ;
1010+ console . log ( "Something went wrong! " + error ) ;
10101011 } ) ;
10111012 }
10121013 } . bind ( this ) , 300 ) ;
You can’t perform that action at this time.
0 commit comments