如何在使用MediaRecorder
录制视频时获取视频文件的大小?
String recVideoPath = Environment.getExternalStorageDirectory() + videoRecordedFileName;
File file = new File(recVideoPath);
long fileVideo = file.length();
大致上类似于上面的那个。
currentPosition = (int) mediaPlayer.getCurrentPosition();
yourProgressBar.setProgress(currentPosition);
希望这能帮到你 :)