0.0.35 • Published 3 years ago
cordova-plugin-video-recorder v0.0.35
cordova-plugin-video-recorder
Setup
- Install plugin in your ionic project
me@pc:~/app$ npm install --save cordova-plugin-video-recorder
me@pc:~/app$ ionic cordova plugin add cordova-plugin-video-recorder
- Add to
config.xml
under ios platform:
<preference name="UseSwiftLanguageVersion" value="5" />
<config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
<string>The app needs permission for video recording</string>
</config-file>
<config-file parent="NSMicrophoneUsageDescription" platform="ios" target="*-Info.plist">
<string>The app needs permission for audio recording</string>
</config-file>
- Add to
config.xml
under android platform:<config-file parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android"> <uses-feature android:name="android.hardware.camera" android:required="true" /> <uses-feature android:name="android.hardware.camera.autofocus" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> </config-file>
Usage
if (window.hasOwnProperty('cordova')) {
let options = {
mask: 'bar', // 'bar' (default), 'eyes', 'none'
camera: 'front', // 'front' (default), 'rear'
opacity: 0.5, // 0.7 default
btnHeight: 50, // 50 default
btnWidth: 70, // 70 default
btnRightMargin: 20, // 20 default
btnBottomMargin: 10, // 10 default
};
window['VideoRecorder'].show(
options,
(event: any) => {
console.log(event);
// start -> starteed recording; does NOT end subscription
// cancel -> cancelled recording; ends subscription
// <file_path> -> video location; ends subscription
},
(err: any) => {
console.log(err);
}
);
}
0.0.32
3 years ago
0.0.33
3 years ago
0.0.34
3 years ago
0.0.35
3 years ago
0.0.30
3 years ago
0.0.31
3 years ago
0.0.28
3 years ago
0.0.29
3 years ago
0.0.26
3 years ago
0.0.27
3 years ago
0.0.24
3 years ago
0.0.25
3 years ago
0.0.23
3 years ago
0.0.22
3 years ago
0.0.21
3 years ago
0.0.20
3 years ago
0.0.19
3 years ago
0.0.15
3 years ago
0.0.16
3 years ago
0.0.17
3 years ago
0.0.18
3 years ago
0.0.14
3 years ago
0.0.10
3 years ago
0.0.11
3 years ago
0.0.12
3 years ago
0.0.13
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.3
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago