nstudio / nativescript-camera-plus

MIT License
79 stars 50 forks source link

Vue Error on Record #71

Open packytagliaferro opened 5 years ago

packytagliaferro commented 5 years ago

I am currently using this in a Vue project and get this error on record:

Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: this.startVideoRecording is not a function. (In 'this.startVideoRecording()', 'this.startVideoRecording' is undefined)

I have the camera setup like this:

<CameraPlus
                        v-else
                        row="0"
                        col="1"
                        debug="true"
                        enableVideo="true"
                        showFlashIcon="false"
                        showToggleIcon="true"
                        showCaptureIcon="true"
                        showGalleryIcon="false"
                        height="30%"
                        ref="videocamera"
                        @videoRecordingFinishedEvent="videoDone"
                    ></CameraPlus>

then I have a button I record using:

record() {
            this.$refs.videocamera.nativeView.record();

        },

I have tried some other methods like "Flash" and those seem to work

Logikgate commented 5 years ago

Check out #70, I ran into the same issue with video and photos. Are you running version 2.1.0? If so, reverting back to 2.0.2 might fix your issue