Open liuyi opened 5 years ago
1、MediaRecorderActivity.java 修改这个方法,为结束返回结果到上一个: @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(RESULT_OK, intent); finish(); }
2、MediaRecorderActivity.java 添加CANCEL动作,修复奇怪的问题。
加在 case MotionEvent.ACTION_UP: 下面:
case MotionEvent.ACTION_CANCEL: // startState = false;//added by liuyi mMediaRecorder.setRecordState(false); if (mMediaObject.getDuration() >= RECORD_TIME_MAX) { mTitleNext.performClick(); } else { mMediaRecorder.setStopDate(); setStopUI(); }
break;
3、SmallVideoLib2的 build.gradle 去掉bintray插件依赖
4、SmallVideoLib2的 build.gradle里的complie 修改为
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) }
1、MediaRecorderActivity.java 修改这个方法,为结束返回结果到上一个: @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);
2、MediaRecorderActivity.java 添加CANCEL动作,修复奇怪的问题。
加在 case MotionEvent.ACTION_UP: 下面:
case MotionEvent.ACTION_CANCEL: // startState = false;//added by liuyi mMediaRecorder.setRecordState(false); if (mMediaObject.getDuration() >= RECORD_TIME_MAX) { mTitleNext.performClick(); } else { mMediaRecorder.setStopDate(); setStopUI(); }
3、SmallVideoLib2的 build.gradle 去掉bintray插件依赖
4、SmallVideoLib2的 build.gradle里的complie 修改为
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) }