Commit 9610bf97e176f1e1a26cc281f4deecfc3e5576da
1 parent
5412eba4
处理默认
Showing
7 changed files
with
9 additions
and
6 deletions
config.gradle
lib_media/src/main/java/com/cnlive/media/PickerConfig.java
lib_media/src/main/java/com/cnlive/media/frame/presenter/MediaPresenter.java
| ... | ... | @@ -88,7 +88,7 @@ public class MediaPresenter extends MvpBasePresenter<MediaView> { |
| 88 | 88 | mediaPickerActivity.mOptions.setJumpCameraMode(PickerConfig.CAMERA_MODE_ALL); |
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | - | |
| 91 | + mediaPickerActivity.maxTime = mediaPickerActivity.mOptions.getMaxTime(); | |
| 92 | 92 | mediaPickerActivity.showTime = mediaPickerActivity.mOptions.isShowTime(); |
| 93 | 93 | mediaPickerActivity.selectGift = mediaPickerActivity.mOptions.isSelectGift(); |
| 94 | 94 | mediaPickerActivity.singlePick = mediaPickerActivity.mOptions.isSinglePick(); | ... | ... |
lib_media/src/main/java/com/cnlive/media/frame/view/RecordFragmentView.java
| ... | ... | @@ -90,7 +90,7 @@ public class RecordFragmentView implements MvpView, PLRecordStateListener { |
| 90 | 90 | if (getActivity().mOptions != null && getActivity().mOptions.getMaxTime() > 0) { |
| 91 | 91 | recordSetting.setMaxRecordDuration(getActivity().mOptions.getMaxTime()); |
| 92 | 92 | } else { |
| 93 | - recordSetting.setMaxRecordDuration(60 * 1000); | |
| 93 | + recordSetting.setMaxRecordDuration(PickerConfig.RECODE_MAX_TIME); | |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | recordSetting.setRecordSpeedVariable(true); | ... | ... |
lib_media/src/main/java/com/cnlive/media/model/ImagePickerOptions.java
| ... | ... | @@ -42,7 +42,7 @@ public class ImagePickerOptions implements Parcelable { |
| 42 | 42 | public boolean singlePick = false; |
| 43 | 43 | //展示时长 |
| 44 | 44 | public boolean showTime = false; |
| 45 | - public int maxTime = PickerConfig.DEFAULT_MAX_TIME; | |
| 45 | + public int maxTime = PickerConfig.RECODE_MAX_TIME; | |
| 46 | 46 | //是否选择Gif |
| 47 | 47 | public boolean selectGift = true; |
| 48 | 48 | //处理返回uri地址 | ... | ... |
lib_media/src/main/java/com/cnlive/media/ui/activity/MediaActivity.java
| ... | ... | @@ -63,6 +63,8 @@ public class MediaActivity extends MvpBindingActivity<MediaView, MediaPresenter, |
| 63 | 63 | public String MEDIA_HOME = "tag_media_home"; |
| 64 | 64 | public String MEDIA_PRE = "tag_media_pre"; |
| 65 | 65 | |
| 66 | + public int maxTime = PickerConfig.RECODE_MAX_TIME; | |
| 67 | + | |
| 66 | 68 | //配置 |
| 67 | 69 | public ImagePickerOptions mOptions; |
| 68 | 70 | //加载器 | ... | ... |
lib_media/src/main/java/com/cnlive/media/ui/widget/record/ShootView.java
| ... | ... | @@ -54,7 +54,7 @@ public class ShootView extends View implements Runnable { |
| 54 | 54 | //当前进度 |
| 55 | 55 | int curProgress = 0; |
| 56 | 56 | //最大进度 |
| 57 | - int maxTime = 10000; | |
| 57 | + int maxTime = PickerConfig.RECODE_MAX_TIME; | |
| 58 | 58 | //倒计时时间 |
| 59 | 59 | |
| 60 | 60 | Paint innerPaint; |
| ... | ... | @@ -93,7 +93,7 @@ public class ShootView extends View implements Runnable { |
| 93 | 93 | progressWidth = typedArray.getDimensionPixelSize(R.styleable.MediaShootViewStyle_mediaProgressWidth, 10); |
| 94 | 94 | |
| 95 | 95 | curProgress = typedArray.getInt(R.styleable.MediaShootViewStyle_curProgress, 0); |
| 96 | - maxTime = typedArray.getInt(R.styleable.MediaShootViewStyle_maxProgress, PickerConfig.DEFAULT_MAX_TIME); | |
| 96 | + maxTime = typedArray.getInt(R.styleable.MediaShootViewStyle_maxProgress, PickerConfig.RECODE_MAX_TIME); | |
| 97 | 97 | |
| 98 | 98 | typedArray.recycle(); |
| 99 | 99 | ... | ... |