不同的版本,api的不同
recorder = (if (Build.VERSION.SDK_INT >=Build.VERSION_CODES.S){
MediaRecorder(context)
}else { MediaRecorder() }).also {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O){
it.setOutputFile(outFile.absolutePath)
}else{
it.setOutputFile(outFile)
}
}