Wowza Community

Error during device orientation


I have a problem during device orientation.

I use GoCoder SDK in a fragment loaded by an Activity.

I can start the app in portrait mode but the fragment that use the SDK is locked in landscape mode.

If I change the device’s orientation when I click the button that start the fragment I get this error:

2019-10-08 17:38:19.655 4148-4148/it.tim.videolive.pslte E/AndroidRuntime: FATAL EXCEPTION: main Process: it.tim.videolive.pslte, PID: 4148 java.lang.RuntimeException: set display orientation failed at android.hardware.Camera.setDisplayOrientation(Native Method) at com.wowza.gocoder.sdk.api.devices.WOWZCamera.autoDetectOrientation( at com.wowza.gocoder.sdk.api.devices.WOWZCameraView.doConfigChange( at com.wowza.gocoder.sdk.api.devices.WOWZCameraView.onConfigurationChanged( at at at at at at at at$H.handleMessage( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invoke(Native Method) at$ at

If I click the button in portrait mode and wait the fragment is fully loaded I have no problem.

Same if I click the button with device in landscape mode.

There is a way to intercept the orientation changing during the fragment’s loading?

Thanks in advance

By default @DarthXander, the live stream will maintain the orientation of the device when the broadcast began. However, there are some settings you can adjust and I will direct you to that documentation.

You can adjust some settings to reflect the following: same as device, always landscape, always portrait.

I think to have resolved the problem (but I must do some testing) placing this code in the onDestroy and onBackPressed methods of my fragment.

try {

catch (Exception e) {}

goCoderCameraView is the WOWZCameraView object that I use in my fragment.

It’s like something remains active in the view after the endBroadcast called in the WOWZBroadcast Object.