mabeijianxi / small-video-record

利用FFmpeg视频录制微信小视频与其压缩处理
Apache License 2.0
3.46k stars 729 forks source link

- -为啥录制成功一定要跳转到另外一个activity, #304

Open mynameispp opened 6 years ago

mynameispp commented 6 years ago

不可以写个回调 参数吗?

sglei commented 6 years ago

这种交互完全可以自己写啊,修改MediaRecorderActivity:


//启动录制
public static void goSmallVideoRecorder(Activity context, MediaRecorderConfig mediaRecorderConfig) {
        context.startActivityForResult(new Intent(context, MediaRecorderActivity.class).putExtra(MEDIA_RECORDER_CONFIG_KEY, mediaRecorderConfig), MediaRecorderBase.RECORD_VIDEO_CODE);
    }

//完成转码
@Override
    public void onEncodeComplete() {
        hideProgress();
        Intent intent = new Intent();
        intent.putExtra(MediaRecorderActivity.OUTPUT_DIRECTORY, mMediaObject.getOutputDirectory());
        intent.putExtra(MediaRecorderActivity.VIDEO_URI, mMediaObject.getOutputTempTranscodingVideoPath());
        intent.putExtra(MediaRecorderActivity.VIDEO_SCREENSHOT, mMediaObject.getOutputVideoThumbPath());
        intent.putExtra("go_home", GO_HOME);
        setResult(Activity.RESULT_OK, intent);
        finish();
    }```
MaleWxt commented 6 years ago

可以自己改,不看代码吗?