diff --git a/Classes/Camera/CameraController.swift b/Classes/Camera/CameraController.swift index e46ab5f52..82fe785dc 100644 --- a/Classes/Camera/CameraController.swift +++ b/Classes/Camera/CameraController.swift @@ -365,8 +365,8 @@ open class CameraController: UIViewController, MediaClipsEditorDelegate, CameraP private func createNextStepViewController(_ segments: [CameraSegment], selected: Array.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 diff --git a/Classes/Rendering/MediaPlayer.swift b/Classes/Rendering/MediaPlayer.swift index ce4b5710f..6678663c0 100644 --- a/Classes/Rendering/MediaPlayer.swift +++ b/Classes/Rendering/MediaPlayer.swift @@ -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 { diff --git a/Classes/Utility/Device.swift b/Classes/Utility/Device.swift index 2674848cc..00a4083f7 100644 --- a/Classes/Utility/Device.swift +++ b/Classes/Utility/Device.swift @@ -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 @@ -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 } diff --git a/Kanvas.podspec b/Kanvas.podspec index 5fb38009e..a2db627b6 100644 --- a/Kanvas.podspec +++ b/Kanvas.podspec @@ -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"