20 Commits

Author SHA1 Message Date
Ahmed Bekhit b923fac2f9 Merge pull request #130 from fattalgazi/swift_5
Update README.md
2021-07-13 16:54:09 -04:00
isa 9e103afc7b Update README.md 2021-07-13 22:33:57 +03:00
Ahmed Bekhit b7e1facded Merge pull request #122 from seriyvolk83/audio_crash_fix
Fixing potential crash #101
2020-12-09 17:47:19 -05:00
Ahmed Bekhit 63c9ebb500 Merge pull request #117 from Jlack6/patch-1
Update README.md
2020-12-09 17:46:13 -05:00
Ahmed Bekhit 3162fa72fb Update README.md 2020-11-19 16:10:43 +03:00
Alexander Volkov 0c9a76a77a Handling flag properly 2020-11-10 12:16:49 +03:00
Alexander Volkov e2ba1ac1c3 Adding check 2020-11-10 12:08:45 +03:00
Alexander Volkov 092413fb42 Fixing potential crash 2020-11-10 11:54:57 +03:00
James Lack 7596d066a6 Update README.md
Added ScribScrab to the Apps using ARVideoKit
2020-09-11 09:23:50 -04:00
Ahmed Bekhit 275f850486 Merge pull request #115 from mattbierner/patch-1
Add In The Walls app
2020-08-30 16:07:01 -04:00
Ahmed Bekhit e150e00203 Update README.md 2020-08-21 17:24:48 -04:00
Matt Bierner e2d5e537e3 Add In The Walls app
Adds [In The Walls](https://apps.apple.com/us/app/id1522257130) to the readme. We use this library for recording video
2020-08-05 19:43:35 -07:00
Ahmed Bekhit 1ef5e99fe7 Merge pull request #113 from shaj04/ARRenderer_content_mode_bugfix
adjust when to set renderer.ARcontentMode
2020-08-01 20:31:52 -04:00
Ahmed Bekhit 62a6c6a89a Update README.md 2020-07-30 21:50:13 -04:00
shajie e8dae8c989 adjust when to set renderer.ARcontentMode 2020-06-12 19:00:46 +08:00
Ahmed Bekhit 2d87e3e7e7 Merge pull request #111 from AFathi/CocoaPodsUpdate-patch-1
Update to latest version
2020-04-25 15:58:46 -04:00
Giacomo 74a3159c70 Update to latest version 2020-04-23 15:27:12 +02:00
Ahmed Bekhit 589e6e77d4 Merge pull request #108 from 0k1019/feature/MaxDevice
Fix iPhone X Max, XS Max, 11Pro Max size recording size problem.
2020-04-15 17:20:06 -04:00
Youngho Kwon d1c840e383 Update isNotch function consider when landscape mode. 2020-04-09 16:12:18 +09:00
Youngho Kwon ae9c620621 Fix iPhone X Max, XS Max, 11Pro Max size recording size problem. Renewing "isiPhone10" extension to "isNotch". 2020-03-24 15:41:44 +09:00
6 changed files with 28 additions and 13 deletions
+2 -3
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ARVideoKit"
s.version = "1.5.51"
s.version = "1.6.0"
s.summary = "Capture & record ARKit videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆."
s.description = "Enabling developers to capture videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆 with augmented reality components."
s.homepage = "https://github.com/AFathi/ARVideoKit"
@@ -17,7 +17,6 @@ Pod::Spec.new do |s|
s.platform = :ios, "11.0"
# ARVideoKit for Swift 5.0
s.source = { :git => "https://github.com/AFathi/ARVideoKit.git", :tag => "1.5.51" }
s.source = { :git => "https://github.com/AFathi/ARVideoKit.git", :tag => "1.6.0" }
s.source_files = "ARVideoKit", "ARVideoKit/**/*.{h,m,swift}"
s.resources = "ARVideoKit/Assets/*.scnassets"
end
+2 -2
View File
@@ -14,8 +14,8 @@ extension UIScreen {
/**
`isiPhone10` is a boolean that returns if the device is iPhone X or not.
*/
var isiPhone10: Bool {
return self.nativeBounds.size == CGSize(width: 1125, height: 2436) || self.nativeBounds.size == CGSize(width: 2436, height: 1125)
var isNotch: Bool {
return UIApplication.shared.keyWindow?.safeAreaInsets != UIEdgeInsets.zero
}
}
@available(iOS 11.0, *)
+2 -2
View File
@@ -44,7 +44,7 @@ struct RenderAR {
if let contentMode = ARcontentMode {
switch contentMode {
case .auto:
if UIScreen.main.isiPhone10 {
if UIScreen.main.isNotch {
width = Int(UIScreen.main.nativeBounds.width)
height = Int(UIScreen.main.nativeBounds.height)
}
@@ -62,7 +62,7 @@ struct RenderAR {
width = Int(targetSize.width)
height = Int(targetSize.height)
default:
if UIScreen.main.isiPhone10 {
if UIScreen.main.isNotch {
width = Int(UIScreen.main.nativeBounds.width)
height = Int(UIScreen.main.nativeBounds.height)
}
+7 -2
View File
@@ -152,7 +152,7 @@ class WritAR: NSObject, AVCaptureAudioDataOutputSampleBufferDelegate {
audioInput.expectsMediaDataInRealTime = true
audioBufferQueue.async {
self.session.startRunning()
self.session?.startRunning()
}
if assetWriter.canAdd(audioInput) {
@@ -208,7 +208,10 @@ class WritAR: NSObject, AVCaptureAudioDataOutputSampleBufferDelegate {
func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
if let input = audioInput {
audioBufferQueue.async { [weak self] in
if input.isReadyForMoreMediaData && (self?.isRecording)! {
if let isRecording = self?.isRecording,
let session = self?.session,
input.isReadyForMoreMediaData && isRecording
&& session.isRunning {
input.append(sampleBuffer)
}
}
@@ -227,6 +230,7 @@ class WritAR: NSObject, AVCaptureAudioDataOutputSampleBufferDelegate {
}
if assetWriter.status == .writing {
isRecording = false
assetWriter.finishWriting(completionHandler: finished)
}
}
@@ -237,6 +241,7 @@ class WritAR: NSObject, AVCaptureAudioDataOutputSampleBufferDelegate {
session.stopRunning()
}
}
isRecording = false
assetWriter.cancelWriting()
}
}
+3 -3
View File
@@ -172,7 +172,6 @@ import PhotosUI
private var renderEngine: SCNRenderer!
private var gpuLoop: CADisplayLink!
private var isResting = false
private var ARcontentMode: ARFrameMode!
private var renderer: RenderAR!
private var scnView: SCNView!
@@ -725,7 +724,7 @@ import PhotosUI
- parameter configuration: An object that defines motion and scene tracking behaviors for the session.
*/
@objc func prepare(_ configuration: ARConfiguration? = nil) {
ARcontentMode = contentMode
renderer.ARcontentMode = contentMode
onlyRenderWhileRec = onlyRenderWhileRecording
if let view = view as? ARSCNView {
UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
@@ -761,6 +760,8 @@ extension RecordAR {
//frame rendering
if self.onlyRenderWhileRec && !isRecording && !isRecordingGIF { return }
renderer.ARcontentMode = contentMode
guard let buffer = renderer.buffer else { return }
guard let rawBuffer = renderer.rawBuffer else {
logAR.message("ERROR:- An error occurred while rendering the camera's main buffers.")
@@ -770,7 +771,6 @@ extension RecordAR {
logAR.message("ERROR:- An error occurred while rendering the camera buffer.")
return
}
renderer.ARcontentMode = contentMode
self.writerQueue.sync {
+12 -1
View File
@@ -2,6 +2,13 @@
> Use [master](https://github.com/AFathi/ARVideoKit/tree/master) branch for projects written in Swift 4.0
## Sponsors
[**Chemical Wedding**](https://www.chemicalwedding.tv)
![Chemical Wedding](https://www.chemicalwedding.tv/imgs/general/logo-main.png)
## ARVideoKit
![intro image](http://www.ahmedbekhit.com/projects/repo-header-arvideokit.png)
An iOS Framework that enables developers to capture videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆 with ARKit content.
@@ -20,6 +27,7 @@ In other words, you **NO LONGER** have to ~screen record~/~screenshot~ to captur
| [Implementation](#implementation) | Lists the [steps needed](#implementation) for Objective-C & Swift, [notes](#note), and [reference](#youre-all-set-) for more options |
| [Publishing to the App Store](#publishing-to-the-app-store) | Describes the steps **required** before submitting an application using `ARVideoKit` to the App Store. |
|[![Donate](https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_donate_92x26.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ahmedfbekhit@gmail.com&item_name=Support+ARVideoKit+Developer&item_number=ARVideoKit+Framework+Donations&amount=0%2e00&currency_code=USD) | [Donations](#donate) will support me to keep maintaining `ARVideoKit` ❤️|
|[Sponsors](#sponsors) | Featuring the sponsors of this project |
| [Contributions](#contributions) | Describes how you can contribute to this project |
| [Apps using ARVideoKit](#apps-using-arvideokit) | A list of published applications using ARVideoKit |
| [License](#license) | Describes `ARVideoKit` license |
@@ -146,7 +154,7 @@ To do so, follow those steps:
Donations will support me to keep maintining **ARVideoKit Framework** ❤️
[![Donate](https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_donate_92x26.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ahmedfbekhit@gmail.com&item_name=Support+ARVideoKit+Developer&item_number=ARVideoKit+Framework+Donations&amount=0%2e00&currency_code=USD)
## Contributions
If you have an idea for a new **ARVideoKit** feature/functionality and want to add it to this repository, feel free to fork the project and create a pull request!
@@ -155,7 +163,10 @@ Also, feel free to create an issue if you have any suggestions or need any help
## Apps using ARVideoKit
| App | Description |
| ------------------ |:------------------:|
| [Pathica](https://apps.apple.com/us/app/pathica/id1564780182) | The first proof of the theory of "six degrees of separation" which is the idea that any two people on the planet can be connected through five or fewer individuals. |
| [Our SolAR](https://itunes.apple.com/app/id1267675913) | An app that allows you to see our Solar System anywhere at all! |
| [In The Walls](https://apps.apple.com/us/app/id1522257130) | Uses real time face tracking and AR to put your face in any real world wall! |
| [ScribScrab](https://apps.apple.com/in/app/scribscrab/id1339432955) | ScribScrab is a tool for creativity. Youre only limited to your imagination and your battery life. |
_Feel free to add your application to this list!_
## License