Fix demo app

pull/360/head
Mattia Iavarone 6 years ago
parent 8e8818af78
commit 7a5e0b33e4
  1. 6
      demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java

@ -20,6 +20,8 @@ import com.otaliastudios.cameraview.PictureResult;
import com.otaliastudios.cameraview.Mode; import com.otaliastudios.cameraview.Mode;
import com.otaliastudios.cameraview.VideoResult; import com.otaliastudios.cameraview.VideoResult;
import java.io.File;
public class CameraActivity extends AppCompatActivity implements View.OnClickListener, ControlView.Callback { public class CameraActivity extends AppCompatActivity implements View.OnClickListener, ControlView.Callback {
@ -163,7 +165,7 @@ public class CameraActivity extends AppCompatActivity implements View.OnClickLis
} }
if (camera.isTakingPicture() || camera.isTakingVideo()) return; if (camera.isTakingPicture() || camera.isTakingVideo()) return;
message("Recording for 5 seconds...", true); message("Recording for 5 seconds...", true);
camera.takeVideo(null, 5000); camera.takeVideo(new File(getFilesDir(), "video.mp4"), 5000);
} }
private void captureVideoSnapshot() { private void captureVideoSnapshot() {
@ -172,7 +174,7 @@ public class CameraActivity extends AppCompatActivity implements View.OnClickLis
return; return;
} }
message("Recording snapshot for 5 seconds...", true); message("Recording snapshot for 5 seconds...", true);
camera.takeVideoSnapshot(null, 5000); camera.takeVideoSnapshot(new File(getFilesDir(), "video.mp4"), 5000);
} }
private void toggleCamera() { private void toggleCamera() {

Loading…
Cancel
Save