How to know when MediaRecorder has finished writing data to file

前端 未结 6 973
迷失自我
迷失自我 2021-02-05 08:01

We\'re using MediaRecorder to record video to a file on the external storage using setOutputFile() before doing the actual recording.

Everything works fine, but the main

6条回答
  •  借酒劲吻你
    2021-02-05 08:34

    I haven't tried this myself but this might work:

    public void release () Since: API Level 1

    Releases resources associated with this MediaRecorder object. It is good practice to call this method when you're done using the MediaRecorder.

    If it does what it says, then I guess if you call this and after this method returns you know the file is ready.

提交回复
热议问题