Configure Custom Recording Settings
masterTo use advanced settings like custom encoders, bitrates, or dimensions, you must first call hbRecorder.enableCustomSettings().
Warning: If a selected parameter is not supported by the device, HBRecorderOnError will be triggered. It is recommended to set the video encoder to "DEFAULT" to allow MediaRecorder to select the best available option.
hbRecorder.enableCustomSettings();
// Audio Source (Must be a valid MediaRecorder.AudioSource constant)
hbRecorder.setAudioSource(String);
// Video Encoder (Must be a valid MediaRecorder.VideoEncoder constant)
hbRecorder.setVideoEncoder(String);
// Screen Dimensions (Height, Width)
hbRecorder.setScreenDimensions(HeightInPx, WidthInPx);
// Video Parameters
hbRecorder.setVideoFrameRate(int); // Frame rate is device dependent
hbRecorder.setVideoBitrate(int); // Bitrate depends on device and frame rate
// Output Format (Must be a valid MediaRecorder.OutputFormat constant)
hbRecorder.setOutputFormat(String);