-
Notifications
You must be signed in to change notification settings - Fork 140
Video upload improvements #852
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
Changes from all commits
44a2a7d
5768309
67b3331
d85fa37
b83eadd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,28 +58,39 @@ extension AVCaptureDevice { | |
| } | ||
|
|
||
| extension UserDefaults { | ||
| enum ProPhotoUploadSettingsKeys : String { | ||
| enum ProMediaUploadSettingsKeys : String { | ||
| case PreferOriginals = "pro-photo-upload-prefer-originals" | ||
| case PreferRAW = "pro-photo-upload-prefer-raw" | ||
| case PreferOriginalVideos = "pro-video-upload-prefer-originals" | ||
| } | ||
|
|
||
| public var preferOriginalPhotos: Bool { | ||
| set { | ||
| self.set(newValue, forKey: ProPhotoUploadSettingsKeys.PreferOriginals.rawValue) | ||
| self.set(newValue, forKey: ProMediaUploadSettingsKeys.PreferOriginals.rawValue) | ||
| } | ||
|
|
||
| get { | ||
| return self.bool(forKey: ProPhotoUploadSettingsKeys.PreferOriginals.rawValue) | ||
| return self.bool(forKey: ProMediaUploadSettingsKeys.PreferOriginals.rawValue) | ||
| } | ||
| } | ||
|
|
||
| public var preferRawPhotos: Bool { | ||
| set { | ||
| self.set(newValue, forKey: ProPhotoUploadSettingsKeys.PreferRAW.rawValue) | ||
| self.set(newValue, forKey: ProMediaUploadSettingsKeys.PreferRAW.rawValue) | ||
| } | ||
|
|
||
| get { | ||
| return self.bool(forKey: ProPhotoUploadSettingsKeys.PreferRAW.rawValue) | ||
| return self.bool(forKey: ProMediaUploadSettingsKeys.PreferRAW.rawValue) | ||
| } | ||
| } | ||
|
|
||
| public var preferOriginalVideos: Bool { | ||
| set { | ||
| self.set(newValue, forKey: ProMediaUploadSettingsKeys.PreferOriginalVideos.rawValue) | ||
| } | ||
|
|
||
| get { | ||
| return self.bool(forKey: ProMediaUploadSettingsKeys.PreferOriginalVideos.rawValue) | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -98,14 +109,20 @@ class ProPhotoUploadSettingsSection: SettingsSection { | |
|
|
||
| self.add(row: preferOriginalsRow) | ||
|
|
||
| if AVCaptureDevice.rawCameraDeviceAvailable() { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you remove the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What about raw files stored on devices without the latest camera? I created the file in iPhone 12 Pro Max, but did my upload testing with the iPhone 8 test device.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, good point. I missed that option!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hosy that was exactly the intension to allow users upload RAW photos from their iCloud synced photo library shot on more capable device. |
||
| let preferRawRow = StaticTableViewRow(switchWithAction: { (_, sender) in | ||
| if let enableSwitch = sender as? UISwitch { | ||
| userDefaults.preferRawPhotos = enableSwitch.isOn | ||
| } | ||
| }, title: "Prefer RAW photos".localized, value: self.userDefaults.preferRawPhotos, identifier: "prefer-raw") | ||
| let preferRawRow = StaticTableViewRow(switchWithAction: { (_, sender) in | ||
| if let enableSwitch = sender as? UISwitch { | ||
| userDefaults.preferRawPhotos = enableSwitch.isOn | ||
| } | ||
| }, title: "Prefer RAW photos".localized, value: self.userDefaults.preferRawPhotos, identifier: "prefer-raw") | ||
|
|
||
| self.add(row: preferRawRow) | ||
| } | ||
| self.add(row: preferRawRow) | ||
|
|
||
| let preferOriginalVideosRow = StaticTableViewRow(switchWithAction: { (_, sender) in | ||
| if let enableSwitch = sender as? UISwitch { | ||
| userDefaults.preferOriginalVideos = enableSwitch.isOn | ||
| } | ||
| }, title: "Prefer original videos".localized, value: self.userDefaults.preferOriginalVideos, identifier: "prefer-original-videos") | ||
|
|
||
| self.add(row: preferOriginalVideosRow) | ||
| } | ||
| } | ||
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.
This needs to be uncommented
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.
I commented that out because it failed and prevented Bitrise builds a few weeks ago (IIRC). When putting it back in, please check whether IPAs are still being built.
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.
Should be fixed with the latest
mastermerged inside