What am I trying to do?
I am building a camera app with ionic and need to record video. I have the preview setup in the app correctly with a simple record button on top. I want to add video recording function to the plugin and being able to call
What I have done?
Added video recording functionality to the plugin for the android platform. I added the
exec functions in
CameraPreview.js and the function signatures in
What is going wrong?
home.page.ts from my project, I am trying to call
this.cameraPreview.stopRecording() but when I run
ionic cordova run android I get the following error:
ERROR in src/app/home/home.page.ts:90:32 - error TS2339: Property 'startRecording' does not exist on type 'CameraPreview'. 90 this.cameraPreview.startRecording(); ~~~~~~~~~~~~~~ src/app/home/home.page.ts:92:32 - errorgn TS2339: Property 'stopRecording' does not exist on type 'CameraPreview'. 92 this.cameraPreview.stopRecording(); ~~~~~~~~~~~~~ [ERROR] An error occurred while running subprocess ng. ng run app:ionic-cordova-build --platform=android exited with exit code 1.
What have I tried so far?
- removing and adding the android platform to recompile plugin. The plugin is getting re-compiled (checked this by adding a
Log.d()function call and running adb logcat to find it). So the code is being added.
npm installafter editing plugin
- making the changes to the plugin in the
node_modulesfolder within my ionic project
- adding the plugin directly by copying the plugin folder to a different directory and then adding the plugin via the copied plugin
- a variety of other things I can’t remember
Let me know if you want to see any of the files I mentioned.