-
Notifications
You must be signed in to change notification settings - Fork 461
Camera Video Recording #2710
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
base: main
Are you sure you want to change the base?
Camera Video Recording #2710
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VladislavAntonyuk I believe you're using the old Camera2 APi, you should use the CameraX API instead, it will be simpler and it's newer
here for reference https://developer.android.com/media/camera/camerax/video-capture
I see we reference a NuGet for camera 2, that is why I used this implementation. According to Google camera 2 is not obsolete, but allows you to have a full control of the camera. CameraX just a convenient way to work with camera api. I will update to CameraX. |
Ensures proper handling of the video recording stream by setting appropriate file access and share options. Also, explicitly flushes the stream and nullifies the file after copying to prevent potential issues with file access or deletion. Addresses an issue where the `VideoRecordEvent` was not correctly identified as the final event.
Updates the `PlatformStartVideoRecording` method signature on Tizen to accept a stream, allowing for greater flexibility in handling video data.
Updated CameraViewPage.xaml to include buttons for starting/stopping video recording and setting night mode. Changed "GetStream" button text to "Save Video Recording" and repositioned "Capture Image" button. Simplified video file creation in CameraManager.android.cs by removing unnecessary ContentValues. Modified PlatformStopVideoRecording to change flow after stopping video recording. Enhanced CreateStopVideoRecordingCommand to use async lambda for better asynchronous operation handling.
Hey @TheCodeTraveler, thank you for the code review. Why did you change StartVideoRecording method to return the stream? |
This reverts commit 6be4152.
Updates the camera permission request to also request microphone permissions. This ensures that the application has the necessary permissions to record audio when capturing video.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Vlad!!
I updated ICameraView
to include the following API:
Task StartVideoRecording(CancellationToken token = default);
This provides an easy path for developers who do not need to provide us a custom Stream
.
The developer will then retrieve their video recording Stream
from StopVideoRecording
:
Stream videoRecordingStream = await StopVideoRecording(CancellationToken.None);
Description of Change
Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information
https://vladislavantonyuk.github.io/articles/Turn-any-phone-into-an-IP-Camera-in-30-Minutes-using-.NET-MAUI/