Skip to content

Adds a method to remove an existing video capture device.#36

Closed
dsmurfin wants to merge 2 commits intoMetalPetal:masterfrom
dsmurfin:Remove-Video-Device
Closed

Adds a method to remove an existing video capture device.#36
dsmurfin wants to merge 2 commits intoMetalPetal:masterfrom
dsmurfin:Remove-Video-Device

Conversation

@dsmurfin
Copy link
Collaborator

@dsmurfin dsmurfin commented Mar 6, 2022

No description provided.

public func removeVideoCaptureDevice() {
self.captureSession.beginConfiguration()

if let currentVideoDeviceInput = self.videoDeviceInput {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use guard let to only call the beginConfiguration/commitConfiguration when we do have a video device input.

@YuAo
Copy link
Member

YuAo commented Mar 15, 2022

Can you describe the situation in which you'd like to remove the video device input?

@dsmurfin
Copy link
Collaborator Author

dsmurfin commented Apr 6, 2024

Closing in favour of #49

@dsmurfin dsmurfin closed this Apr 6, 2024
@dsmurfin dsmurfin deleted the Remove-Video-Device branch April 6, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants