【发布时间】:2020-10-11 12:06:56
【问题描述】:
我已经创建了 Ziggeo 嵌入式录像机,我的视图要求是 320*320,但是实现后摄像头分辨率不符合视图(打开默认摄像头分辨率),所以请帮忙。
这里是Java代码
Ziggeo ziggeo1 = new Ziggeo(appToken, this);
RecorderConfig config = ziggeo1.getRecorderConfig();
config.setResolution(new Size(320, 320));
RecorderConfig configBuilder = new RecorderConfig.Builder(this)
.maxDuration(5000)
.shouldSendImmediately(false)
.shouldEnableCoverShot(false)
.resolution(config.getResolution())
.configureStopRecordingConfirmationDialog(new StopRecordingConfirmationDialogConfig())
.shouldConfirmStopRecording(true)
.facing(CameraView.FACING_FRONT)
.shouldShowFaceOutline(true)
.quality(CameraView.QUALITY_HIGH)
.callback(this)
.build();
ziggeo1.setRecorderConfig(configBuilder);
ziggeo1.enableCrashTracker(this);
ziggeo1.attachCameraRecorder(getSupportFragmentManager(), R.id.video_container);
这里是xml代码
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/recorder_layout"
android:orientation="vertical"
android:layout_marginTop="20dp"
android:layout_gravity="center">
<FrameLayout
android:id="@+id/video_container"
android:layout_width="320dp"
android:layout_height="320dp"
/>
</LinearLayout>
【问题讨论】:
标签: android android-fragments video-recording ziggeo-api ziggeo-sdk