AFathi / ARVideoKit

Capture & record ARKit videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆.
Apache License 2.0
1.62k stars 226 forks source link

Fixing bug with rotation of the views and #114 #121

Closed seriyvolk83 closed 3 years ago

seriyvolk83 commented 3 years ago
  1. The library was rotating all views reacting to rotation events. This is done automatically by iOS, the library must not do that.

  2. The library was force rotating the device when recorded is initialized. It's not needed.

seriyvolk83 commented 3 years ago

No need to merge. The logic of the app is correct. If you need clarification why, then ask.

GuruprasathRamaprasath commented 3 years ago

@seriyvolk83 When my app is in landscape and rendering a ARScene the remote person is getting the ARscene as Portrait mode , the videoOrientation of remote view is fixedLandscape. Can you please help what is wrong?

seriyvolk83 commented 3 years ago

@GuruprasathRamaprasath there is an issue in iOS that does not allow to get 3D objects from the render in landscape orientation. While video from camera goes normal, all 3D objects are rotated and shifted. The render has no options and seems to work normally only in portrait mode. That's why the framework rotates the device - it's the only way to get the normal video.

I tried to implement all possible solutions to get landscape video and there are only 4 options (check CaptureType).

Try the example and check how UI and final video (in Photos) app looks like for each case.

GuruprasathRamaprasath commented 3 years ago

Thanks @seriyvolk83 👍 will surely try out. Thanks for your time to help me out.

seriyvolk83 commented 3 years ago

If you will find a solution for applying changes to the render independently from ARKit scene, then reply (I found that when transformation is applied to the render added for video capture only, it affects the main render used for ARKit scene too - the bug I mentioned earlier).