I've succeeded recording video using the mediaRecorder
class on Android.
However, what I need to do now is to make it record till I tell it to stop, but keep only max of X seconds recorded.
For example, if I've started recording at time=0 (seconds), and I've set it to record max of 10 seconds, if I stop the recording on time=20 (seconds), the recorded video will be of the 10..20 seconds period.
The only thing similar to what I've found is setMaxDuration, but that automatically stops after the specified time was set, so in my case it will record only the first 10 seconds.