janusw / Camera.Maui

A CameraView Control for .NET Maui
MIT License
17 stars 3 forks source link

Fix Issues 1,2,3 GitHub #4

Closed rdurish closed 5 months ago

rdurish commented 5 months ago

Updated Plugin and Sample to .net 8. Fixed recording on iOS 17 with .net 8 Fixed recording on Android API 34 Fixed upside down recordings on Android.

janusw commented 5 months ago

I can confirm that this PR fixes issue #1 (by using the Camera.MAUI.Test app): Recording works now on iOS 17, but I think there is one remaining problem: If I record a second video, then the first one that I recorded is not overwritten. That behavior is different from iOS 16, where overwriting works.

I think this can be solved by deleting the file before recording, as suggested in https://github.com/hjam40/Camera.MAUI/issues/122#issuecomment-1896298482.

@rdurish Can you add that fix, or should I do it?

janusw commented 5 months ago

I can also confirm that this PR fixes issues #2 (by using Camera.MAUI.Test, as before): I can record and playback a video on Android 14, which is great.

BUT: Recording with the back camera actually produces an upside-down recording for me, so I'd disagree with your rotation change. (Recording with the front camera works well, also both previews are alright).

rdurish commented 5 months ago

Interesting so you think we need different rotation arrays for front and back cameras?This is one buggy library lolSent from my iPhoneOn Jan 21, 2024, at 11:27 AM, Janus Weil @.***> wrote: I can also confirm that this PR fixes issues #2 (by using Camera.MAUI.Test, as before): I can record and playback a video on Android 14, which is great. BUT: Recording with the back camera actually produces an upside-down recording for me, so I'd disagree with your rotation change. (Recording with the front camera works well, also both previews are alright).

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

janusw commented 5 months ago

Interesting so you think we need different rotation arrays for front and back cameras?

Not necessarily. I hope we should be fine with finding the right mapping of SurfaceOrientation to degree values.

What I was saying is that your mapping does not work for me in all cases. I still have to check if the original mapping works in my case.

Can you tell us under what conditions issue #3 occurs for you (Android version, library version, device)? Are you checking with the Camera.MAUI.Test app or your own application?

(Also note: When fixing several bugs in one PR, it's usually better to separate the fixes into individual commits, otherwise it's harder to check their effects separately ...)

janusw commented 5 months ago

Can you tell us under what conditions issue #3 occurs for you (Android version, library version, device)? Are you checking with the Camera.MAUI.Test app or your own application?

And, also very important: Does issue #3 affect the front or back camera, or both? That issue really is a bit short on information. Please amend.

rdurish commented 5 months ago

Interesting so you think we need different rotation arrays for front and back cameras?

Not necessarily. I hope we should be fine with finding the right mapping of SurfaceOrientation to degree values.

What I was saying is that your mapping does not work for me in all cases. I still have to check if the original mapping works in my case.

Can you tell us under what conditions issue #3 occurs for you (Android version, library version, device)? Are you checking with the Camera.MAUI.Test app or your own application?

(Also note: When fixing several bugs in one PR, it's usually better to separate the fixes into individual commits, otherwise it's harder to check their effects separately ...)

My bad noted. When I was in there fixing I just noticed other items when testing.

rdurish commented 5 months ago

Requests pushed.

janusw commented 5 months ago

Recording works now on iOS 17, but I think there is one remaining problem: If I record a second video, then the first one that I recorded is not overwritten. That behavior is different from iOS 16, where overwriting works.

I think this can be solved by deleting the file before recording, as suggested in hjam40#122 (comment).

I can confirm that the latest commit fixes this problem. Thanks for the update!

janusw commented 5 months ago

I can also confirm that this PR fixes issues #2 (by using Camera.MAUI.Test, as before): I can record and playback a video on Android 14, which is great.

BUT: Recording with the back camera actually produces an upside-down recording for me, so I'd disagree with your rotation change. (Recording with the front camera works well, also both previews are alright).

This also seems to be solved now. On an Android 14 device with the Test app, both preview and recording of the front and back camera have the right orientation. Awesome! 🥳