Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check camera permission and request access if needed #1479

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

SystemKeeper
Copy link
Collaborator

The app crashes when camera access is denied and we try to start/join a video call:

  • Disable camera access in the iOS settings
  • Try to join a video call
  • 💣

Also I noticed that since we switched to NCCameraController for camera access, we never request access to the camera anymore (I assume this was done by WebRTC before).

This PR does the following:

  • Checks if camera access was granted before trying to access the camera
  • If camera access is not available, the camera button in the CallViewController is disabled
  • When starting a call, we check if camera access was requested, if not, we request it.

@SystemKeeper SystemKeeper requested a review from Ivansss December 28, 2023 22:58
@Ivansss
Copy link
Member

Ivansss commented Jan 12, 2024

Also I noticed that since we switched to NCCameraController for camera access, we never request access to the camera anymore (I assume this was done by WebRTC before).

That's not the case in my tests 🤔 it requests camera access even without the changes in this PR.
The crash is reproducible.

@SystemKeeper
Copy link
Collaborator Author

That's not the case in my tests 🤔

Just retested and I am now asked for permission as well 🤔 I am pretty sure that in my tests that did not work, because I had to select "Camera" from sharing to see the permission dialog. Weird.
Shall we remove https://github.com/nextcloud/talk-ios/pull/1479/files#diff-4924e88da89128e4862d29acf861ed8f2193a745b7c350546046e978ae62e462R157-R166 and keep the rest?

@Ivansss
Copy link
Member

Ivansss commented Jan 12, 2024

Shall we remove https://github.com/nextcloud/talk-ios/pull/1479/files#diff-4924e88da89128e4862d29acf861ed8f2193a745b7c350546046e978ae62e462R157-R166 and keep the rest?

Yes :) I think we can remove that part of the code. The rest of the PR makes total sense ;)

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@SystemKeeper SystemKeeper force-pushed the camera-access-improvements branch from 8de73a6 to 6ff047d Compare January 12, 2024 12:40
@SystemKeeper
Copy link
Collaborator Author

Yes :)

Done 👍

@Ivansss Ivansss merged commit c57047d into master Jan 17, 2024
7 checks passed
@Ivansss Ivansss deleted the camera-access-improvements branch January 17, 2024 16:35
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