Skip to content

Instantly share code, notes, and snippets.

@floriangbh
Created August 6, 2020 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floriangbh/ced7143391204d43cfcc1664b0a3f35a to your computer and use it in GitHub Desktop.
Save floriangbh/ced7143391204d43cfcc1664b0a3f35a to your computer and use it in GitHub Desktop.
//Create builder
LocalCamera localCamera = new LocalCamera(surfaceView)
//Start recording
if (localCamera.prepareAudio() && localCamera.prepareVideo()) {
localCamera.startRecord()
} else {
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//Stop recording
rtmpCamera1.stopStream()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment