Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

那个短点录像我发现那个进度条有个问题不能正常的显示,以及录制时间到达限制以后不能及时关闭(已解决) #56

Open
xhcui2008 opened this issue Jul 21, 2021 · 1 comment

Comments

@xhcui2008
Copy link

1.关于进度条显示不正常的解决方法
com.aserbao.androidcustomcamera.whole.record.beans.MediaObject
public class MediaPart implements Serializable{ public String mediaPath; public int duration; public int number; public long startTime; public int endTime=0; public boolean remove; public String getMediaPath(){ return mediaPath; } public void setDuration(int duration) { this.duration = duration; } public int getDuration() { return endTime>0?endTime:duration > 0 ? duration : (int) ( System.currentTimeMillis() - startTime); } }
原因:每次进度条递增,这个视频时间只是根据当前时间和开始时间来计算的,这样导致录制停止以后也会继续执行。
2.录制时间达到限制后不能及时关闭
com.aserbao.androidcustomcamera.whole.record.RecorderActivity
` mVideoRecordProgressView.setOverTimeClickListener(new ProgressView.OverTimeClickListener() {
@OverRide
public void overTime() {
setBackAlpha(mVideoRecordFinishIv,255);
mCustomRecordImageView.performClick();
}

        @Override
        public void noEnoughTime() {
            setBackAlpha(mVideoRecordFinishIv,255);
        }

        @Override
        public void isArriveCountDown() {
            mCustomRecordImageView.performClick();
        }
    });`
@xhcui2008
Copy link
Author

对了第一个问题,忘记添加一样代码了位置在:
com.aserbao.androidcustomcamera.whole.record.ui.ProgressView
public void stop() { MediaObject.MediaPart part =mMediaObject.getMedaParts().get(mMediaObject.getMedaParts().size()-1); part.endTime=part.getDuration(); mProgressChanged = false; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant