arkavo-org / app

Arkavo app for the Apple ecosystem
GNU General Public License v3.0
0 stars 0 forks source link

Video API fix #40

Closed arkavo-com closed 1 week ago

arkavo-com commented 1 week ago

Description:

This PR introduces a series of refactors and new functionalities aimed at improving the video capture experience within the app. Key changes include:

Major Changes:

  1. Orientation Handling Improvements: • Refactor orientation handling by switching from UIDeviceOrientation to UIInterfaceOrientation for more accurate management of device orientation changes. • Enhanced pixel buffer creation with proper attributes. • Added thread safety to kasPublicKey updates. • Removed deprecated and unnecessary color correction functionality.
  2. Refactor VideoCaptureManager to VideoCaptureViewController: • Moved VideoCaptureManager logic into a new UIViewController subclass (VideoCaptureViewController) for better integration with UIKit. • Reorganized camera permissions, session setup, and streaming capabilities within the new VideoCaptureViewController. • This change simplifies SwiftUI integration and streamlines video-related operations.
  3. Front/Back Camera Switching: • Added functionality to switch between front and back cameras during video capture. • Introduced a new button in the UI to enable this switching functionality.
  4. Local and Incoming Video Display Toggle: • Added a button to switch between displaying local and incoming video feeds in VideoStreamView. • Refactored VideoStreamView to conditionally display either the VideoPreviewArea or the new VideoIncomingArea based on the state variable isShowingLocalVideo. • Created the toggleVideoSource function to handle the logic behind switching the video source.

Benefits:

• Improved orientation handling for a more consistent video capture experience. • Streamlined code for easier future maintenance and better integration with UIKit. • New front/back camera switching and video display toggle functionalities enhance user interactivity during video streaming.

Test Instructions:

  1. Verify that orientation changes are handled smoothly during video capture.
  2. Ensure the camera permission flow works as expected within VideoCaptureViewController.
  3. Test the new button to switch between front and back cameras during video capture.
  4. Test the toggle functionality to switch between local and incoming video feeds in VideoStreamView.

Related Issues:

• None.

Additional Notes:

• Refactoring of the VideoCaptureManager paves the way for further video-related enhancements.

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
5 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud