@@ -404,14 +404,6 @@ public class CameraViewController: UIViewController,
404404 return !isRecording
405405 }
406406
407- public override func willAnimateRotation( to toInterfaceOrientation: UIInterfaceOrientation , duration: TimeInterval ) {
408- // Deprecated and not called on modern iOS; kept for any OS version that
409- // still invokes it. `viewWillTransition` below is the live rotation path —
410- // both funnel into the same idempotent orientation update.
411- orientation = getOrientation ( )
412- self . rotateCameraToOrientation ( orientation: toInterfaceOrientation)
413- }
414-
415407 public override func viewWillTransition( to size: CGSize , with coordinator: UIViewControllerTransitionCoordinator ) {
416408 super. viewWillTransition ( to: size, with: coordinator)
417409 coordinator. animate ( alongsideTransition: { [ weak self] _ in
@@ -489,9 +481,6 @@ public class CameraViewController: UIViewController,
489481 }
490482 self . currentZoomFactor = videoDevice. videoZoomFactor
491483
492- // Camera capabilities are now sent through peer-to-peer communication in CamStates.swift
493- // No need to send to session actor directly here
494-
495484 // Audio setup will be done only when starting video recording
496485 // This prevents requesting microphone permission upfront
497486 self . configSessionOutput ( )
@@ -629,29 +618,6 @@ public class CameraViewController: UIViewController,
629618 }
630619 }
631620
632- func getCurrentTorchMode( ) -> AVCaptureDevice . TorchMode {
633- return videoDeviceInput? . device. torchMode ?? . off
634- }
635-
636- func hasTorch( ) -> Bool {
637- return videoDeviceInput? . device. hasTorch ?? false
638- }
639-
640- func setFlashMode( mode: AVCaptureDevice . FlashMode , device: AVCaptureDevice ) -> Try < AVCaptureDevice . FlashMode > {
641- if device. hasFlash {
642- do {
643- try device. lockForConfiguration ( )
644- self . cameraSettings. flashMode = mode
645- device. unlockForConfiguration ( )
646- } catch let error as NSError {
647- return Failure ( error: error)
648- } catch {
649- return Failure ( error: NSError ( domain: " Unknown error " , code: 0 , userInfo: nil ) )
650- }
651- }
652- return Success ( mode)
653- }
654-
655621 // MARK: - Virtual Device Preference
656622
657623 /// Returns the best camera device for the given position, preferring virtual devices.
@@ -856,25 +822,6 @@ public class CameraViewController: UIViewController,
856822 )
857823 }
858824
859- func sendCameraCapabilities( ) {
860- guard let currentDevice = self . videoDeviceInput? . device else { return }
861-
862- let capabilities = RemoteCmd . CameraCapabilitiesResp (
863- frontCamera: frontCameraInfo,
864- backCamera: backCameraInfo,
865- currentCamera: currentDevice. position,
866- currentLens: currentLensType,
867- currentZoom: currentZoomFactor,
868- currentVideoResolution: currentVideoResolution,
869- currentVideoFrameRate: currentVideoFrameRate,
870- currentPhotoFormat: currentPhotoFormat,
871- currentHDRMode: currentHDRMode,
872- error: nil
873- )
874-
875- session ! capabilities
876- }
877-
878825 // MARK: - Current Camera Capabilities for Toggle Response
879826 func gatherCurrentCameraCapabilities( ) -> RemoteCmd . CameraCapabilitiesResp ? {
880827 debugLog ( " 🔍 DEBUG: gatherCurrentCameraCapabilities called " )
@@ -1540,10 +1487,6 @@ extension CameraViewController: AVCaptureVideoDataOutputSampleBufferDelegate, AV
15401487 print ( " 📤 DEBUG: Sent SendVideoResource message to actor system " )
15411488 }
15421489
1543- // MARK: - Video Transfer Progress
1544- // Video transfer progress is now handled directly in CameraVideoStates.swift
1545- // via the direct ctrl reference passed to camera states
1546-
15471490 func setupAssetWriterVideoInput( _ formatDescription: CMVideoFormatDescription ,
15481491 assetWriter: AVAssetWriter ) -> Bool {
15491492 var videoSettings = self . videoDataOutput. recommendedVideoSettingsForAssetWriter ( writingTo: . mov)
0 commit comments