twilio / video-quickstart-ios

Twilio Video Quickstart for iOS
https://www.twilio.com/docs/api/video
MIT License
460 stars 178 forks source link

Support screen orientation - Help Wanted #515

Closed Ankish closed 4 years ago

Ankish commented 4 years ago

Description

In our app, we support all orientations. Using the example app, when we rotate the device, the video in the local track does not rotate as well in the remote participant. How do we support orientation without scenes? [Description of the issue]

Steps to Reproduce

  1. Run the example app with orientation enabled

Video iOS SDK

3.4.0 Twilio SDK

Xcode

Xcode 11.5 * updated after comment

iOS Version

iOS 13

iOS Device

All devices

ceaglest commented 4 years ago

Hey @Ankish,

In our app, we support all orientations. Using the example app, when we rotate the device, the video in the local track does not rotate as well in the remote participant. How do we support orientation without scenes?

Tracking should be automatic as long as your app is not using UIScene. If you use UIScene you need to tell us which scene to track (like the QS example does). I see a couple of issues:

  1. The 3.x Video SDK requires Xcode 11, but it looks like you are using Xcode 10. The QS is not going to function properly for rotations if you do this... Try upgrading to Xcode 11 which supports the iOS 13 SDK.

  2. If you aren't using UIScene then you need to remove the Scene tracking configuration from TVICameraSource. Maybe this was never being set since you used Xcode 10?

https://github.com/twilio/video-quickstart-ios/blob/master/VideoQuickStart/ViewController.swift#L216

Let me know if you're able to get it working or need more help.

Best, Chris

Ankish commented 4 years ago
  1. Worked ! Thanks a ton for quick response.