HBRecorder
HBRecorder copied to clipboard
Xiaomi Redmi Note 8 Pro and Redmi Note 9 (M2003J15SS) DefaultVideoEncoder Bug
Hello, I faced an issue with the phones which I wrote on Title. (Xiaomi Redmi Note 8 Pro and Redmi Note 9)
Default Video Encoder selection is not working on these devices. I solve this problem with code down below. For these devices i used H264 encoder instead DEFAULT
/**
* Solution for Xiaomi Redmi Note 8 Pro and Redmi Note 9 (M2003J15SS) DefaultVideoEncoder Bug
*/
if (Build.MODEL.toString().contains("Redmi Note 8 Pro") || Build.MODEL.toString().contains("M2003J15SC")) {
hbRecorder!!.setVideoEncoder("H264")
} else {
hbRecorder!!.setVideoEncoder("DEFAULT")
}