twilio / video-quickstart-ios

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

How to find remote user has using landscape or portrait mode during video call #557

Open madhu-kadyala opened 3 years ago

madhu-kadyala commented 3 years ago

Hi team, I am using twilio SDK in my app for app to app video call. When remote user using landscape mode, for others using portrait then I have to make sure that remote view should rotate to portrait mode. Is there any call back when remote user changes their dimension ?

SDK Version -> pod 'TwilioVideo', '~> 3.5' FYI -> My app will support only portrait mode. App details : Hullo: Introduce Your Network Link: https://apps.apple.com/us/app/hullo-introduce-your-network/id1503799717

paynerc commented 3 years ago

@madhu-kadyala,

There is a delegate protocol, TVIVideoViewDelegate that can be provided to TVIVideoView. This delegate will receive callbacks when the dimensions of the track it's rendering changes as well as orientation changes if TVIVideoView.viewShouldRotateContent is set to NO. Between these two callbacks, you should have the information that you need to ensure that you UI is being updated accordingly.

Let me know if you need further guidance,

Ryan

madhu-kadyala commented 3 years ago

@paynerc How can I achieve orientation like how google duo, skype handling. For example, I'm using portrait mode, if the receiver using landscape mode then the remote participant video will automatically rotate in my device. But in twilio remote participant video is not changing in this scenario. I have attached sample screenshot 1601487285159

musheer-ahamed commented 3 years ago

@ryan-rowland @paynerc Any updates? I'm also facing the same issue. I'm looking forward to a solution.