AlbumCameraRecorder
1.1.80X
효율적인 멀티미디어 지원 운영 라이브러리는 다양한 간단한 구성 작업 사진, 앨범, 녹음, 녹음 및 기타 기능 일 수 있습니다.
또한 사진, 비디오, 오디오 9 그리드 기능 표시 사용을 지원합니다.
더 이상 유지 관리되지 않는 비 X 라이브러리 버전 (https://github.com/zhongjhatc/albumcamerarecorder/tree/master)
allprojects {
repositories {
...
maven { url 'https://www.jitpack.io' }
}
}
dependencies {
// if you want to simplify the code and at the same time use multilibrary and progresslibrary, albumCameraRecorderCommon, can directly use the combined library
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:combined:1.1.104X'
// Public library, if not using the combined library above
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:common:1.1.104X'
// core lib, call display album, screen recording, recording, etc
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:multilibrary:1.1.104X'
// It is mainly used to display the relevant upload progress after obtaining data. If you only need to obtain photos, videos and recordings, you don't need to use this
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:progresslibrary:1.1.104X'
// use it with editing pictures
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:imageedit:1.1.104X'
// Supporting editing video use, currently only compression function, continue to add related functions, because the library uses ffmpeg, occupies a file size of 25M, according to the actual situation to choose whether to use
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videoedit:1.1.104X'
// Because the library uses mp4parser, which takes up a file size of about 300kb, choose whether to use it according to the actual situation
implementation 'com.github.zhongjhATC.AlbumCameraRecorder:videomerge:1.1.104X'
}




100% 통근성 테스트 보고서.
// Shooting Related Settings
CameraSetting cameraSetting = new CameraSetting();
// Types supported: picture, video
cameraSetting.mimeTypeSet(MimeType.ofAll());
// album
mAlbumSetting = new AlbumSetting(false)
// Types supported: picture, video
.mimeTypeSet(MimeType.ofAll())
// Whether to display the number of multiple selected images
.countable(true)
// Custom filter
.addFilter(new GifSizeFilter(320, 320, 5 * BaseFilter.K * BaseFilter.K))
// Open the original
.originalEnable(true)
// Maximum original size, valid only if originalEnable is true
.maxOriginalSize(10);
// recorder
RecorderSetting recorderSetting = new RecorderSetting();
// globalSetting
GlobalSetting globalSetting = MultiMediaSetting.from(MainActivity.this).choose(MimeType.ofAll());
globalSetting.cameraSetting(cameraSetting);
globalSetting.albumSetting(albumSetting);
globalSetting.recorderSetting(recorderSetting);
mGlobalSetting
.setOnMainListener(errorMessage -> {
Log.d(TAG, errorMessage);
Toast.makeText(MainSimpleActivity.this.getApplicationContext(), errorMessage, Toast.LENGTH_LONG).show();
})
// Set paths and 7.0 protection paths, and so on
.allStrategy(new SaveStrategy(true, "com.zhongjh.cameraapp.fileprovider", "aabb"))
// for glide-V4
.imageEngine(new Glide4Engine())
// Maximum 5 images or maximum 3 video
.maxSelectablePerMediaType(null,
5,
3,
3,
alreadyImageCount,
alreadyVideoCount,
alreadyAudioCount)
.forResult(REQUEST_CODE_CHOOSE);
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode != RESULT_OK)
return;
List<LocalFile> result = MultiMediaSetting.obtainLocalFileResult(data);
}
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths_public" />
</provider>
간단한 확장은 데모를 참조하십시오. 확장에 대해 더 많이 배우기 위해 더 깊이 가야한다면 카메라 프레임의 간단한 아키텍처
[Cameraview] (https://github.com/natario1/cameraview)의 카메라 내부는 해상도 변경, 테이프 녹음 및 기타 기능이 더 많은 인터페이스를 볼 수 있도록 액세스 할 수 있으므로 Demo 인스턴스에서 카메라 뷰를 사용할 수있는 방법
표시된 라이브러리를 사용하는 경우 다음 API도 귀하에게 유용합니다.
역사 업데이트.
작동한다고 생각되면 별을 줘 (github)
버그를 찾으면 의견을 남기거나 문제를 남겨 두십시오 (문제)
모든 재 인쇄 소스를 표시하십시오