Skip to content
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

Stories bug fixes for 16.8 release #93

Merged
merged 4 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Classes/Camera/CameraController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ open class CameraController: UIViewController, MediaClipsEditorDelegate, CameraP
private func createNextStepViewController(_ segments: [CameraSegment], selected: Array<CameraSegment>.Index, edits: [EditorViewController.Edit?]?) -> MediaPlayerController {
let controller: MediaPlayerController
if settings.features.multipleExports && settings.features.editor {
if segments.indices.contains(selected) {
multiEditorViewController?.addSegment(segments[selected])
segments.forEach { segment in
multiEditorViewController?.addSegment(segment)
}
controller = multiEditorViewController ?? createStoryViewController(segments, selected: selected, edits: edits)
multiEditorViewController = controller as? MultiEditorViewController
Expand Down
5 changes: 5 additions & 0 deletions Classes/Rendering/MediaPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ final class MediaPlayer {
init(renderer: Rendering?) {
self.renderer = renderer ?? Renderer()
self.renderer.delegate = self
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default)
} catch let error {
print("Failed to set audio session category: \(error)")
}
}

deinit {
Expand Down
6 changes: 5 additions & 1 deletion Classes/Utility/Device.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public struct KanvasDevice {
static let iPhone11ScreenHeight = 896
static let iPhone11ProScreenHeight = 812
static let iPhone11ProMaxScreenHeight = 896
static let iPhone12ProScreenHeight = 844
static let iPhone12ProMaxScreenHeight = 926
static let retinaScreenMinScale: CGFloat = 2.0

// Device type
Expand All @@ -44,8 +46,10 @@ public struct KanvasDevice {
static let isIPhone11: Bool = isIPhone && screenMaxLength == iPhone11ScreenHeight
static let isIPhone11Pro: Bool = isIPhone && screenMaxLength == iPhone11ProScreenHeight
static let isIPhone11ProMax: Bool = isIPhone && screenMaxLength == iPhone11ProMaxScreenHeight
static let isIPhone12Pro: Bool = isIPhone && screenMaxLength == iPhone12ProScreenHeight
static let isIPhone12ProMax: Bool = isIPhone && screenMaxLength == iPhone12ProMaxScreenHeight

// Device group
// This group represents all devices which have extra safe space at the top and the bottom, as well as rounded screen corners.
public static let belongsToIPhoneXGroup: Bool = isIPhoneX || isIPhoneXR || isIPhoneXS || isIPhoneXSMax || isIPhone11 || isIPhone11Pro || isIPhone11ProMax
public static let belongsToIPhoneXGroup: Bool = isIPhoneX || isIPhoneXR || isIPhoneXS || isIPhoneXSMax || isIPhone11 || isIPhone11Pro || isIPhone11ProMax || isIPhone12Pro || isIPhone12ProMax
}
2 changes: 1 addition & 1 deletion Kanvas.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "Kanvas"
spec.version = "1.2.2"
spec.version = "1.2.3"
spec.summary = "A custom camera built for iOS."
spec.homepage = "https://github.com/tumblr/kanvas-ios"
spec.license = "MPLv2"
Expand Down