@@ -392,7 +392,7 @@ export class CameraPlus extends CameraPlusBase {
392
392
}
393
393
}
394
394
395
- private _prepareVideoRecorder ( options ?: IVideoOptions ) : boolean {
395
+ private _prepareVideoRecorder ( options ?: IVideoOptions ) {
396
396
if ( ! this . _mediaRecorder ) {
397
397
this . _mediaRecorder = new android . media . MediaRecorder ( ) as android . media . MediaRecorder ;
398
398
CLog ( `this._mediaRecorder` , this . _mediaRecorder ) ;
@@ -467,7 +467,7 @@ export class CameraPlus extends CameraPlusBase {
467
467
const hasStoragePerm = this . hasStoragePermissions ( ) ;
468
468
if ( ! hasStoragePerm ) {
469
469
CLog ( `Application does not have storage permission to save file.` ) ;
470
- return ;
470
+ return null ;
471
471
}
472
472
473
473
fileName = `VID_${ Date . now ( ) } .mp4` ;
@@ -887,7 +887,7 @@ export class CameraPlus extends CameraPlusBase {
887
887
public getFlashMode ( ) {
888
888
if ( this . camera === null || this . camera === undefined ) {
889
889
CLog ( "no camera" ) ;
890
- return ;
890
+ return null ;
891
891
}
892
892
893
893
const params = this . camera . getParameters ( ) ;
@@ -995,11 +995,14 @@ export class CameraPlus extends CameraPlusBase {
995
995
this . _toggleCamBtn . setImageResource ( switchCameraDrawable ) ;
996
996
const shape = CamHelpers . createTransparentCircleDrawable ( ) ;
997
997
this . _toggleCamBtn . setBackgroundDrawable ( shape ) ;
998
- this . _toggleCamBtn . setOnClickListener ( {
999
- onClick : ( view : android . view . View ) => {
1000
- this . toggleCamera ( ) ;
1001
- }
1002
- } ) ;
998
+ this . _toggleCamBtn . setOnClickListener (
999
+ new android . view . View . OnClickListener ( {
1000
+ onClick : ( view : android . view . View ) => {
1001
+ this . toggleCamera ( ) ;
1002
+ }
1003
+ } )
1004
+ ) ;
1005
+
1003
1006
const toggleCamParams = new android . widget . RelativeLayout . LayoutParams (
1004
1007
WRAP_CONTENT ,
1005
1008
WRAP_CONTENT
0 commit comments