Comments (12)
sharedInstance.videoConfiguration.transform = CGAffineTransform(scaleX: -1, y: 1)
this was the only thing that worked. setting mirroringMode has no effect.
from nextlevel.
Meanwhile, if someone encounters the same issue, an alternate solution to obtain the video mirrored is to change the video configuration transform.
sharedInstance.videoConfiguration.transform = CGAffineTransform(scaleX: -1, y: 1)
from nextlevel.
hey @Slash7 thanks, much appreciated. i'll try fix this in my next free opportunity.
from nextlevel.
hey @Slash7 this will fix one crash, may not fix the other you mention
from nextlevel.
👍🏻
from nextlevel.
How do you actually produce an instagram or snapchat style front facing session without flipping the users face?
from nextlevel.
@patthehuman
My default device is .front
I set NextLevel.shared.mirroringMode = .on
in my viewDidLoad
And do this in my delegate
public func nextLevelDevicePositionDidChange(_ nextLevel: NextLevel) {
switch nextLevel.devicePosition {
case .back:
NextLevel.shared.videoConfiguration.transform = CGAffineTransform(scaleX: 1, y: 1)
case .front:
NextLevel.shared.videoConfiguration.transform = CGAffineTransform(scaleX: -1, y: 1)
default:
break
}
}
Works well.
from nextlevel.
thank you. I have implemented that. I am getting this error:
Method 'nextLevel(:didUpdateVideoZoomFactor:)' has different argument labels from those required by protocol 'NextLevelDeviceDelegate' ('nextLevel(:didChangeLensPosition:)')
Are you?
from nextlevel.
@patthehuman You probably just wrote the delegate method wrong or have minor syntax error.. I would just copy these.
/// Video Zoom
public func nextLevel(_ nextLevel: NextLevel, didUpdateVideoZoomFactor videoZoomFactor: Float) {}
public func nextLevel(_ nextLevel: NextLevel, didChangeLensPosition lensPosition: Float) {}
from nextlevel.
This is not working for me actually
from nextlevel.
Can you show your code
from nextlevel.
videoConfiguration.transform = CGAffineTransform(x: -1, y: 1)
for me this produces videos with 180 degrees rotation (though they are opened normally in AVPlayer, QuickTime)
from nextlevel.
Related Issues (20)
- App rejected in app store HOT 3
- Mirroring transform rotated upside down (front camera) HOT 1
- Project's website metadata is outdated: http://nextlevel.engineering webpage is dead HOT 2
- What's the status of the sample app? HOT 2
- Configuring ARKit with Swift Package Dependency HOT 1
- Occlusion : recording not working - object not occluded
- Orientation issue HOT 2
- about shouldOptimizeForNetworkUse setting
- pixelBuffer is nil in the captured photo HOT 1
- Set photo mode, why does the callback to get pictures not go
- Adjust exposure crash HOT 1
- Camera Zoom Change
- Background Audio Stops When Session Starts HOT 1
- NSCoding for Clips HOT 1
- NextLevel ARKit not recording HOT 1
- AudioChannelLayout crash
- Package resolution failed
- update to better support SwiftUI
- Real time video capture- property HOT 2
- Camera is not working when on phone call
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextlevel.