OpenVidu / openvidu-tutorials

OpenVidu tutorials to get started
http://openvidu.io/tutorials
Apache License 2.0
228 stars 255 forks source link

App crashes when phone is being rotated #168

Closed daniel-reinhold closed 2 years ago

daniel-reinhold commented 2 years ago

The app crashes when the phone is rotated to the left (!important) side.

Steps to reproduce:

  1. Go to SessionActivity.java and remove or comment out the line setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
  2. Start the app and join a session
  3. Rotate the phone to the left side

What is the expected output? The layout should change and the stream should go on

What do you see instead? The app crashes

The app crashes only when the phone is rotated to the left side, when we rotate it to the right side, the SurfaceViewRenderer turns black.

Thrown exception: Fatal Exception: java.lang.RuntimeException: glUseProgram: GLES20 error: 1282

micaelgallego commented 2 years ago

The application doesn't support rotation. This is why the sentence is included

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

Pull Requests to support rotation are welcomed.

Regards