Comments (2)
Well,you can try modify captureView.frame like this
if UIDevice.isX {
let width = ceil(view.height * 9.0 / 16.0)
let offsetX = (view.width - width) / 2
captureView?.x = offsetX
captureView?.width = width
}
from tlstorycamera.
Below is what I did & its working fine.
Define variable
var previewLayer: AVCaptureVideoPreviewLayer?
And then inside initCamera()
added below code.
self.previewLayer = AVCaptureVideoPreviewLayer(session: (videoCamera?.captureSession)!)
self.previewLayer?.videoGravity = AVLayerVideoGravity.resizeAspectFill
self.previewLayer?.connection?.videoOrientation = .portrait
self.layer.insertSublayer(self.previewLayer!, at: 0)
self.previewLayer?.frame = (self.frame)
from tlstorycamera.
Related Issues (20)
- 打包的时候报'GPUImageFramework.h' file not find HOT 1
- I want to implement feature of selected image can zoom with pinch gesture. HOT 2
- Question: which GPUImage should I use? HOT 1
- Need to draw circle every 4 seconds but total length of video is 20 seconds HOT 1
- Can’t run when adding the project as sub-project HOT 5
- Crash sometimes
- Other Crash HOT 1
- Processing takes longer time HOT 2
- Can you let me know POD name which i can install library using cocoa pod?
- How to add zoom level in TLStoryCamera ?
- Recorded movies short duration of black video
- Filter While Image/video size in not same as the device screen size
- Question: anyone know of a parallel Android Camera? HOT 1
- Video Quality is low when captured from TLStoryCamera
- Memory leak in framework
- why not use GPUImage 3 ?
- New Request: How can I add support for multiple videos or images ? HOT 2
- Audio sync issue in video preview
- Front camera flash not working
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 tlstorycamera.