twilio / twilio-video.js

Twilio’s Programmable Video JavaScript SDK
https://www.twilio.com/docs/video/javascript
Other
571 stars 217 forks source link

Camera not rotating with iPad when it's upside down #1064

Closed ghost closed 4 years ago

ghost commented 4 years ago

Expected behavior:

When I rotate my iPad, no matter the orientation, the local video feed should respect whatever orientation it's in.

Actual behavior:

When I rotate my iPad, it only updates the local video feed when it's in landscape left, landscape right, or portrait, not when its upside down.

Software versions:

TravBradfield commented 4 years ago

Hey @andrew-tulip ,

I'm implementing this in an angular app. Just wondering how you got your videos working for iOS Safari?

Currently, once I'm connected to the call other see a black video from the iPhone. Then if I disable then enable the camera via the iOS Safari red camera button then eventually the other participant can see the iPhone video.

Any help would be very much appreciated! Thanks.

Travis

ghost commented 4 years ago

Hi there @TravBradfield,

I referred to this project quite a bit: https://github.com/philnash/twilio-video-react-hooks. I never had any issue with iOS Safari, it worked the same way as it did on desktop. I suggest maybe opening an issue if you can't figure this issue out yourself.

TravBradfield commented 4 years ago

Hmm. Okay. That is reassuring. Thanks @andrew-tulip

ghost commented 4 years ago

Any update with this issue?

makarandp0 commented 4 years ago

Hello @andrew-tulip, Thank you for writing about this, and sorry for the late response - I checked my iPad and see the repro. Looks like an issue with the getUserMedia as I see the same behavior on this sample app. https://webrtc.github.io/samples/src/content/getusermedia/gum/

Interestingly I see this only for front camera - back camera rotates fine when iPad is held upside down. One workaround I can think of is to listen for device orientation change and flash a light warning user if its upside down. Would that work in your scenario?

Thanks, Makarand

ghost commented 4 years ago

Thanks for the response @makarandp0, unfortunately the warning light workaround doesn't work well for our use case.

So is this a Safari/WebKit bug then? I can open a Radar with Apple.

makarandp0 commented 4 years ago

Yes, it's an issue with iOS Safari - Please open a bug with Apple.

ghost commented 4 years ago

Opened a bug with Apple here: https://bugs.webkit.org/show_bug.cgi?id=213993.

Closing this issue. Thanks for the help!