Skip to content

Commit

Permalink
Record webcam example
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 10, 2022
1 parent ddfb0fc commit f6af76a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Example-iOS/Sources/Example/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ func delay(seconds: TimeInterval, closure: @escaping () -> Void) {
}

guard
let deviceInfo = Aperture.Devices.iOS().first,
let device = AVCaptureDevice(uniqueID: deviceInfo.id)
let device = AVCaptureDevice.devices(for: .video).first
else {
print("Could not find any iOS devices")
exit(1)
Expand All @@ -35,7 +34,7 @@ aperture.onFinish = {

aperture.start()

print("Recording the screen of “\(deviceInfo.name)” for 5 seconds")
print("Recording the screen of “\(device.localizedName)” for 5 seconds")

delay(seconds: 5) {
aperture.stop()
Expand Down

0 comments on commit f6af76a

Please sign in to comment.