1. Overview
VideoRekorder is an advanced extension for App Inventor2 that allows users to record videos directly within a custom layout. It supports multiple features like switching between front and back cameras, adjusting video quality, and enabling flash. Users can start, pause, mute, and resume recordings effortlessly. The extension also includes events for handling errors and tracking recording status changes, such as when a video is successfully saved. It’s an all-in-one solution for video recording without needing any external apps.
Latest Version: 1
Published: August 13, 2024
Last Updated: August 13, 2024
Aix size: 1.8 mb
2. Blocks
3. Documentation
CameraSwitched | Event raised when camera is switched to front from back or vice-versaisFrontCamera | boolean |
RecordingPaused | Event raised when recording is successfully paused |
RecordingMuted | Event raised when recording is successfully muted |
RecordingUnmuted | Event raised when recording is successfully unmuted |
RecordingResumed | Event raised when recording is successfully resumed |
VideoRecorded | Event raised when video is successfully recorded and saved to given pathvideoPath | text |
ErrorOccurred | Event raised when any error occurserrorMsg | text |
CameraPreviewStarted | Event raised when camera preview started showing in the layout |
CameraPreviewStopped | Event raised when camera preview stopped showing in the layout |
IsFeatureAvailable | Returns whether provided feature is supported or notfeature | text |
InitializeCamera | Initializes preview view in the provided layout and opens default camera. Back camera is always opened by default.container | component |
StartRecording | Starts video recording with configurations set through properties.outputPath | text |
SwitchCamera | Switches between front and back camera. |
StopRecording | Stops currently running video recording and saves video. |
PauseRecording | Pauses currently running video recording. |
MuteRecording | Mutes currently running video recording. |
UnMuteRecording | Unmutes currently running video recording. |
ResumeRecording | Resumes video recording. |
StopCamera | Stops camera preview and removes it from registered layout. |
EnableFlash | Sets flash state. Use this method only after preview started.enable | boolean |
IsFlashOn | Returns whether flash is on or not |
GetSupportedVideoQualities | Returns supported video qualities for opened camera. Use this method only after preview started. |
SetQuality | Set quality for video recording. Use this method only after preview started.quality | text |
RecordAudio | Sets whether to record audio or not. Effective only when set before InitializeCamera method. Property Type : write-only Accepts : boolean |
UseFrontCamera | Sets whether to open and use front camera or back camera. Effective only when set before InitializeCamera method. Property Type : write-only Accepts : boolean |
FlashOn | Sets whether to enable flash or not in camera preview and video recording. Effective only when set before InitializeCamera method. Property Type : write-only Accepts : boolean |
CameraOrientation | Sets orientation (rotation) used in camera preview and video recording. Effective only when set before InitializeCamera method. Property Type : write-only Accepts : number |
Quality | Sets video quality used in camera preview and video recording. Effective only when set before InitializeCamera method. Property Type : write-only Accepts : text |
FeatureBackCamera | Back camera feature Property Type : read-only Accepts : text |
FeatureAutofocusCamera | Autofocus camera feature Property Type : read-only Accepts : text |
FeatureCameraFlash | Camera flash feature Property Type : read-only Accepts : text |
FeatureFrontCamera | Front camera feature Property Type : read-only Accepts : text |
ScaleType | Sets preview scale type Property Type : write-only Accepts : number |
ScaleTypeFillCenter | Scale type FILL_CENTER Property Type : read-only Accepts : number |
ScaleTypeFitCenter | Scale type FIT_CENTER Property Type : read-only Accepts : number |
AspectRatio | Sets aspect ratio of preview and video Property Type : write-only Accepts : number |
AspectRatio4n3 | Aspect ratio 4:3 Property Type : read-only Accepts : number |
AspectRatio16n9 | Aspect ration 16:9 Property Type : read-only Accepts : number |
AspectRatioDefault | Aspect ratio default Property Type : read-only Accepts : number |
4. Usage
Initialize Camera preview in layout
Property blocks are effective only when called before InitializeCamera
block. Also, aspect ratio works best with FitCenter
scale type.
GetSupportedVideoQualities
returns a list of supported qualities for currently opened camera. (back or front)
In addition to these values, HIGHEST
and LOWEST
quality are always supported.
Change quality and switch camera on-demand
There are some limited features which can altered after opening camera.
Record Video
You can leave outputPath
empty. A randomly generated file path will be used.
You can Pause
and Resume
recording using respective blocks.
Close camera when done recording
Make sure to close camera preview when you no longer need it.
This will trigger CameraPreviewStopped
event, if camera was closed successfully.
5. Purchase Extension
Terms and Conditions
By purchasing extension you agree to Extension Buying Policy
6. Demo Video
Thank you.
Hope it helps!