GithubHelp home page GithubHelp logo

camerakit / camerakit-ios Goto Github PK

View Code? Open in Web Editor NEW
668.0 668.0 79.0 210 KB

Library for iOS Camera API. Massively increase performance and ease of use within your next iOS Project.

License: Apache License 2.0

Ruby 1.56% Swift 89.57% Objective-C 8.87%

camerakit-ios's People

Contributors

adrianmteo avatar ajijoyo avatar austinkettner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camerakit-ios's Issues

Using AVAudioSession for audio

Need a little help, how can i add audio input device that was initiated with avAudioSession so i can record video using playAndRecord and ShareWithOthers.

I have tried using it individually but then i have to merge audio video files which takes a lot of time and is making app slower.

Disable Zoom

Hello,

Is there a way to disable the Zoom feature?

Thank you!

In iOS 14 availablePreviewPhotoPixelFormatTypes is no longer accessible use __availablePreviewPhotoPixelFormatTypes as a work around

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

No

Environment

(Please include the following information along with any other relevant environment details.)

CameraKit Version:

iOS Device:

iOS Version:

Steps to Reproduce

(Write your steps here:)

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

(Include your CameraKit setup and usage.)

License ambiguity

There is an ambiguity with the license information. The license file states "Apache" license but the description states "MIT" license.

Rotation issues for video preview

I'm noticing the following behaviors when running the demo app. I'm not sure if they are just issues in the demo app itself, or if the issue lies within the core library. (I'm still digging in.) Regardless, here's what I've found on an iPad Pro 9.7 inch, running iOS 12.1.4:

  1. App starts in landscape orientation:
  • Photos preview fine, and are captured as expected
  • Video previews are rotated 90 degrees, are captured rotated 90 degrees
  1. App starts in landscape orientation but is then rotated to portrait orientation
  • Photos and videos preview fine and are captured as expected
  1. App starts in landscape orientation, is rotated to portrait orientation, then rotated BACK to landscape orientation
  • Photos and videos preview fine and are captured as expected
  1. App starts in portrait orientation:
  • Photos and videos preview fine and are captured as expected

So, it appears as though the issue I'm seeing only occurs when starting the app in landscape orientation. If I rotate the device to portrait and then rotate it back to landscape, everything works fine. If I start in portrait orientation everything works fine. I only see the video preview and the subsequent recorded video rotated incorrectly if I start in landscape and stay in landscape.

Landscape photo always saved as portrait

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

No such file

Environment

CameraKit Version:

0.1

iOS Device:

iPhone 6S

iOS Version:

12.1.4

Steps to Reproduce

(Write your steps here:)

  1. Rotate the device to landscape
  2. Take a photo
  3. Save the photo

Expected Behavior

Photon saved as landscape

Actual Behavior

Photo saved as portrait

Reproducible Demo

Demo in this repo

Broken preview in landscape

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

There is no such file

Environment

CameraKit Version:

0.1

iOS Device:

iPhone 6S

iOS Version:

12.1.4

Steps to Reproduce

  1. Include the component in your app or change the Demo app to support landscape
  2. Rotate the device to landscape

Expected Behavior

The preview should show what the camera sees in landscape

Actual Behavior

Preview showing zoomed picture rotated 90 degrees

Reproducible Demo

This project, the demo when allowing landscape

Permissions

How do I disable the "automatic permission system handling?" I want to prompt the user to enable the camera, and not have it request the user as soon as the app starts.

How to get EXIF data from the image captured?

Is there a way in the library to get the EXIF data from the image captured? I need the date & time the image was taken and additionally name of the image.
The only thing I am getting from Exif is below:

"{Exif}" = { PixelXDimension = 1000; PixelYDimension = 1000; };

Full data:

{ ColorModel = RGB; Depth = 8; Orientation = 6; PixelHeight = 1000; PixelWidth = 1000; ProfileName = "Display P3"; "{Exif}" = { PixelXDimension = 1000; PixelYDimension = 1000; }; "{JFIF}" = { DensityUnit = 0; JFIFVersion = ( 1, 0, 1 ); XDensity = 72; YDensity = 72; }; "{TIFF}" = { Orientation = 6; }; }

Swift Package Manager Support (SPM SUPPORT) ADDED

Is this a bug report?

It's not a bug that i am creating issue for.. I am adding SPM support for this CameraKit. And creating a pull request from
https://github.com/dipcse07/camerakit-ios
Specific SPM Support repo
https://github.com/dipcse07/CameraKit-SPM_Supported

Have you read the Contributing Guidelines?

Yes

Environment

(Please include the following information along with any other relevant environment details.)

CameraKit Version: 1.2.1

iOS Device:

iOS Version:

Steps to Reproduce

(Write your steps here:)

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

(Include your CameraKit setup and usage.)

Crash in CKFVideoSession.swift line 44

Fatal Exception: NSInvalidArgumentException
*** -[AVCaptureSession addInput:] Can't add <AVCaptureDeviceInput: 0x107cfaf10 [Front Camera]> because the device does not support AVCaptureSessionPreset1920x1080 - Use -[AVCaptureDevice supportsAVCaptureSessionPreset:]

Screen Shot 2020-05-07 at 4 42 28 AM

it happens when flipping the camera.

Face detection not working correctly...

Hello,

I have noticed that if I start up and the back camera is on and view a face there is not face detection... then I tap more and enable face detection it does not show the face detection box, HOWEVER, if I switch camera and then switch back the face detection is on.

So, is there a problem for the first time?

Camera not filling screen

Is this a bug report?

Yes.

Have you read the Contributing Guidelines?

Yes.

Environment

CameraKit Version: 1.2.0

iOS Device: iPhone X

iOS Version: 12.1.3

Steps to Reproduce

  1. Setup a basic preview view which fills the ViewController it is contained in
  2. Launch the app
  3. On devices with a notch (or taller devices in general) there will be white borders above and below the actual preview view.

Expected Behavior

Based on popular apps and most other libraries, the expectation from myself (which may not be correct) is that the preview would fill its parent view instead of fit. At a mininmum I'd expect the ability to actually set this behaviour by choice.

Actual Behavior

There is no ability to specify fill/fit mode. This is the code and the outcome.

import UIKit
import CameraKit_iOS
import SnapKit

class CameraViewController: UIViewController {
    //UI Elements
    var previewView: CKFPreviewView = CKFPreviewView()
    var cameraSession: CKFPhotoSession = CKFPhotoSession()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        
        //Setup Preview
        previewView.session = cameraSession
        self.view.addSubview(previewView)
        
        //Update Preview Constraints
        previewView.snp.makeConstraints { (make) in
            make.edges.equalToSuperview()
        }
    }
    
}

File

Swift Package Manager Support (SPM SUPPORT) ADDED

Is this a bug report?

It's not a bug that i am creating issue for.. I am adding SPM support for this CameraKit. And creating a pull request from
https://github.com/dipcse07/camerakit-ios

Have you read the Contributing Guidelines?

Yes

Environment

(Please include the following information along with any other relevant environment details.)

CameraKit Version: 1.2.1

iOS Device:

iOS Version:

Steps to Reproduce

(Write your steps here:)

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

(Include your CameraKit setup and usage.)

Crash in CKFVideoSession

Fatal Exception: NSInvalidArgumentException
*** -[AVCaptureMovieFileOutput startRecordingToOutputFileURL:recordingDelegate:] No active/enabled connections
CKFVideoSession.record(url:_:error:)

Screen Shot 2020-05-07 at 4 41 06 AM

Landscape photo taken with iOS orientation lock enabled is taken as portrait

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

(Please include the following information along with any other relevant environment details.)

CameraKit Version: 1.2.0

iOS Device: iPhone 6S

iOS Version: 12.1.4

Steps to Reproduce

(Write your steps here:)

  1. Enable orientation lock in iOS
  2. Run the sample app
  3. Rotate the device to lansdscape
  4. Take a photo
  5. Save the photo
  6. See the photo taken and saved as portrait (rotated 90 degrees)

Expected Behavior

Photo taken in lanscape should be saved as landscape even if orientation lock is enabled in iOS (same as the default camera app)

Actual Behavior

Photo taken in lanscape is save rotated 90 degrees when iOS orientation lock is enabled.

Reproducible Demo

Sample app in this repo.

Fix idea: use CoreMotion to detect "real" device orientation instead of UIDeviceOrientation

Prefix collision with CloudKit framework

Hello. Thank you for the initiative to bring this framework for all developers. :)

I'm afraid, however, with the class name prefix you choose, that could be collisions with Apple's CloudKit framework.

Apple suggests that ObjC "safe" prefixes use 3 letters and not only 2 (two letters prefixes would be reserved for Apple use only).

In Swift prefixes are not usually required, so they can be removed and only specified for ObjC compatibility purposes.

I'd suggest using something like CKF ("CameraKitFramework") as prefix while in ObjC (CKFSession, for example). And something like CameraSession, for example, while using it in Swift.

Mem leak.

CameraKit Version: Last version.
iOS Device: iPhone SE
iOS Version: 12.2

Steps to Reproduce

  1. Switch between photo/video

Expected Behavior

preview view should be released.

Actual Behavior

image

Wide lens zoom capabilities

Is this a bug report?

No

Have you read the Contributing Guidelines?

Yes

Environment

(Please include the following information along with any other relevant environment details.)

CameraKit Version: 1.2.1

iOS Device: iPhone 11 Pro

iOS Version: 13.2.3

Steps to Reproduce

  1. Zoom buttons to enable wide lens?

Expected Behavior

Camera will adjust to select zoom level

Actual Behavior

N/A

Reproducible Demo

None

Rotate photo to always portrait

How do I take photo always in portrait mode even if the device is in landscape or orientation lock is enabled or not all I want is to take photo in portrait mode.

Settings I have done:

photoSession.session.sessionPreset = .photo
        photoSession.flashMode = .auto
        
        previewView.session = self.photoSession
        previewView.autorotate = false
        previewView.previewLayer?.videoGravity = .resizeAspectFill

Taken in landscape mode and device orientation is locked:

Screen Shot 2022-06-03 at 12 51 21 PM

Taken in landscape mode but device orientation is unlocked:
Screen Shot 2022-06-03 at 12 52 02 PM

iOS Build Error - Unable to use CKFPhotoSession With Objective-C

Is this a bug report?

I am testing this camerakit-ios library with Objective-C, but unfortunately i am unable to create CKFPhotoSession object it's showing compile time error on Xcode.

Have you read the Contributing Guidelines?

Yes

Environment

Xcode Version 11.3.1 (11C504)

CameraKit Version: v1.2.1

iOS Device: Simulator (iPhone 11 Pro Max)

iOS Version: 13.3

Steps to Reproduce

(Write your steps here:)

  1. Follow installation guide for Objective-C

  2. Import CameraKit_iOS in to ViewController.h Header file

#import <UIKit/UIKit.h>

@import CameraKit_iOS;

@interface ViewController : UIViewController


@end
  1. Add flowing code into ViewController.m file
#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    CKFPhotoSession *ckPhotoSession = [[CKFPhotoSession alloc] init];    // Error:  'init' is unavailable

    CKFPreviewView *ckfPreviewView = [[CKFPreviewView alloc] initWithFrame:self.view.bounds];

    *ckfPreviewView.session = ckPhotoSession;  // Error:  Assigning to 'CKFSession' from incompatible type 'CKFPhotoSession *__strong'
}
@end

Expected Behavior

CKFPhotoSession must allow to create an Objective-C object. Unfortunately it's not allow me to create any Session Object.

Actual Behavior

Compile tine error

Reproducible Demo

rahadurr/HelloCamera

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.