triniwiz / nativescript-videorecorder

:video_camera: NativeScript plugin for Video Recording . :video_camera:
Apache License 2.0
43 stars 29 forks source link

[VideoRecorder] Fixes for Android and iOS (#38, #41, #21) + improvments in logic + better Readme #42

Closed Tronix117 closed 6 years ago

Tronix117 commented 6 years ago

Hey !

Like promised, I did some changes for the VideoRecorder, working like a charm on Android all versions, and on iOS. I didn't touched the AdvancedVideoRecorder, but it's my next step.

Changes I made are retro-compatibles, except for one, I moved requestPermissions inside the class. I improved a little bit the structure, by using a common file.

I also improved error reporting and fixed some issues with the promises (when requiring permissions, mainly).

I fixed:

I also added those features:

I improved a bit the README and did a few other minor fixes and changes, no big deal.

Please review! (I know it's a big one, but didn't had time to do small batches)

Here are changes from commits:

fix: optional uses-feature camera & camera autofocus
fix: android recording on Marshmallow+ (#41, #21)
chore: typings for options
refactor: refactor android file + better handling of errors and permi…
refactor: better handle of default options
refactor: use a common file to keep common logic in one place
doc: update README
feat: add VideoRecorder::isAvailable() method, and deprecate options …
feat: add options.position = 'front' | 'back' | 'none'
fix: path of camera roll is now returned on ios (#38)
triniwiz commented 6 years ago

Awesome work will review tomorrow