crossle / janus-gateway-android

Implements Janus gateway video room on Android
MIT License
63 stars 30 forks source link

janus display wrong orientation with front camera #13

Closed fukemy closed 4 years ago

fukemy commented 4 years ago

Here is my camera when i display front camera in app

Here is the image when i view in Janus I have a lot of searching to fix this orientation problem, but still stuck, can you give me some advise plz

fukemy commented 4 years ago

after check log: I saw the result when get all camera

 device: Camera 0, Facing back, Orientation 90
 device: Camera 1, Facing front, Orientation 270

The front camera display as expected in my device, but when display in Janus it rotate 270 degrees like Orientation 270

crossle commented 4 years ago

Two phone also have the problem?

fukemy commented 4 years ago

thanks you for fast reply, i found the way to solve it 😄 , just remove orientation extension from sdp before setlocaldescription

final SessionDescription sdp = new SessionDescription(origSdp.type, origSdp.description.replace("3gpp:video-orientation", ""));

then janus will display origin video without orientation