Skip to content

Commit

Permalink
Correct iOS implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Dec 14, 2023
1 parent ed41f1c commit f94e4be
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions iOS/src/toga_iOS/hardware/camera.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from rubicon.objc import objc_method

import toga
from toga.constants import FlashMode, VideoQuality
from toga.constants import FlashMode
from toga.hardware.camera import Camera as TogaCamera
from toga_iOS.libs import (
AVAuthorizationStatus,
Expand All @@ -11,7 +11,6 @@
UIImagePickerControllerCameraCaptureMode,
UIImagePickerControllerCameraDevice,
UIImagePickerControllerCameraFlashMode,
UIImagePickerControllerQualityType,
UIImagePickerControllerSourceTypeCamera,
)

Expand All @@ -35,11 +34,11 @@ def native_flash_mode(flash):
}.get(flash, UIImagePickerControllerCameraFlashMode.Auto)


def native_video_quality(quality):
return {
VideoQuality.HIGH: UIImagePickerControllerQualityType.High,
VideoQuality.LOW: UIImagePickerControllerQualityType.Low,
}.get(quality, UIImagePickerControllerQualityType.Medium)
# def native_video_quality(quality):
# return {
# VideoQuality.HIGH: UIImagePickerControllerQualityType.High,
# VideoQuality.LOW: UIImagePickerControllerQualityType.Low,
# }.get(quality, UIImagePickerControllerQualityType.Medium)


class TogaImagePickerController(UIImagePickerController):
Expand Down

0 comments on commit f94e4be

Please sign in to comment.