mMediaRecorder.setMaxDuration(5000); // 5 seconds
mMediaRecorder.setOnInfoListener(new MediaRecorder.OnInfoListener() {
@Override
public void onInfo(MediaRecorder mediaRecorder, int i, int i1) {
if (i == MediaRecorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED) {
}
}
});
Hello , i am trying to stop the media recorder every 5 seconds and start after 5 seconds until user stop the recording can anyone help me for that?
not kotlin but kotlin colored 4
j
Jakub Syty
07/14/2023, 9:43 AM
Do you have any specific issue you need help with or you just want somebody to do the work for you?
h
Hari Moradiya
07/14/2023, 9:50 AM
I need to save each 5 seconds of recording (Chunk data) I don't know if it is possible with OnInfoListener method
j
Jakub Syty
07/14/2023, 10:00 AM
Just call mediaRecorder.stop() there and save the video like you would in the media recorder