Skip to content

[BUG]Custom permission requests make camera preview buggy #92

@gerchicov-vg

Description

@gerchicov-vg

Prerequisites

  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected Behavior

I want to request camera and microphone permissions separately from this library. You hid this code so I created a request to make this code public:
#91
But now I see that your code is buggy. I just request camera permission and then microphone permission (which is optional #54). I expect that both permissions requested but if camera is not available it shouldn't be shown on the screen

Current Behavior

I allowed camera permission only but do nothing with microphone permission. Camera preview should show picture only but it contains extra controls.
NOTE: the problem persists even if you relaunch the app.

Steps to Reproduce

I just request camera permission manually because the default behaviour is not suitable for me

Code Sample

Params to show camera (didn't include swiftui property checks)

MCamera()
                            .setCameraOutputType(.video)
                            .setResolution(.hd1280x720)
                            .setCameraPosition(.front)
                            .setGridVisibility(false)
                            .setAudioAvailability(false)
                            .startSession()
                            .disabled(true)
                            .frame(width: 120, height: 160)
                            .cornerRadius(15)

Screenshots

Image

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Name Version
SDK 3.0.1
Xcode 16.2
Operating System iOS 17.5
Simulator iPhone SE (2nd gen)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions